53. Maximum Subarray Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the a ...
分类:
其他好文 时间:
2017-04-09 22:05:30
阅读次数:
162
Something happened in Uzhlyandia again... There are riots on the streets... Famous Uzhlyandian superheroes Shean the Sheep and Stas the Giraffe were c ...
分类:
其他好文 时间:
2017-04-09 20:15:03
阅读次数:
200
第八章 数组 英语新识: array 数组 length 长度 sort 分类 maximum 最大 minimum 最小 reference 索引 info 信息 primitive 原始 语法新知: 数组的插入 方式一: int [ ] num=new int [4]; num [0]=45; ...
分类:
其他好文 时间:
2017-04-09 18:44:12
阅读次数:
110
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi ...
分类:
其他好文 时间:
2017-04-08 01:04:10
阅读次数:
195
Given a list of strings, you need to find the longest uncommon subsequence among them. The longest uncommon subsequence is defined as the longest subs ...
分类:
其他好文 时间:
2017-04-08 00:25:01
阅读次数:
286
在看函数的arguments对象的时候,用了arguments.callee写了一个递归。 当执行函数func(99999)时候,直接报错了,一看,原来栈溢出了。 当执行递归运算的时候,忘记加点判断条件,出现死循环。栈溢出就是调用堆栈不断地增长,直到达到一个限制,浏览器硬编码的堆栈大小或内存耗尽。 ...
分类:
其他好文 时间:
2017-04-08 00:09:19
阅读次数:
203
原题 A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. T ...
分类:
其他好文 时间:
2017-04-07 15:53:46
阅读次数:
294
Sliding Window Time Limit: 12000MSMemory Limit: 65536KTotal Submissions: 59348Accepted: 17040Case Time Limit: 5000MS Description An array of size n ≤ ...
分类:
其他好文 时间:
2017-04-06 18:24:07
阅读次数:
193
原题链接在这里:https://leetcode.com/problems/third-maximum-number/#/description 题目: Given a non-empty array of integers, return the third maximum number in t ...
分类:
其他好文 时间:
2017-04-06 10:00:27
阅读次数:
176
有关概念: 最长上升子序列(LIS,Longest Increasing Subsequence),在一个序列中最长的单调递增的子序列 例子: 输入: 2 1 5 3 6 4 8 9 7 输出: 5 (1)第一种解法: fi表示以第i个数结尾的LIS长度 对于序列中的一个数i,在i前面枚举数j,j满 ...
分类:
其他好文 时间:
2017-04-05 23:36:02
阅读次数:
159