- 博客(4)
- 资源 (3)
- 收藏
- 关注
原创 [LeetCode 324] Wiggle Sort II
Given an unsorted array nums, reorder it such that nums[0] nums[2] .Example:(1) Given nums = [1, 5, 1, 1, 6, 4], one possible answer is [1, 4, 1, 5, 1, 6]. (2) Given nums = [1, 3, 2, 2, 3
2016-01-13 17:18:23 2883 1
原创 [LeetCode 326] Power of Three
Given an integer, write a function to determine if it is a power of three.Follow up:Could you do it without using any loop / recursion?Solution:3^x=nlog(3^x) = log(n)x log(3) = log(n)
2016-01-13 17:11:38 4394
原创 [LeetCode 318] Maximum Product of Word Lengths
Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that each word will contain only lower case lett
2016-01-12 16:25:17 4074
原创 [LeetCode 322] Coin Change
You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of mone
2016-01-12 16:22:11 3396
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人