Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ...
分类:
其他好文 时间:
2015-01-16 18:48:24
阅读次数:
139
题目:Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
思路:题目要求的s的一个最长回...
分类:
编程语言 时间:
2015-01-15 23:54:08
阅读次数:
207
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:
其他好文 时间:
2015-01-15 23:20:18
阅读次数:
194
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest...
分类:
其他好文 时间:
2015-01-15 22:12:45
阅读次数:
169
写JS的时候,一不注意就方法递归死循环了。
下面是错误截图:
找到对应代码 ,处理下即可!...
分类:
其他好文 时间:
2015-01-15 13:02:24
阅读次数:
269
题目:
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the l...
分类:
编程语言 时间:
2015-01-15 13:02:10
阅读次数:
229
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2015-01-15 12:34:54
阅读次数:
111
Maximum sumTime Limit:1000MSMemory Limit:65536KTotal Submissions:34398Accepted:10661DescriptionGiven a set of n integers: A={a1, a2,..., an}, we defin...
分类:
其他好文 时间:
2015-01-15 12:20:16
阅读次数:
163
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy on...
分类:
其他好文 时间:
2015-01-15 09:27:56
阅读次数:
187
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-01-14 16:44:41
阅读次数:
109