Description:Write a function to find the longest common prefix string amongst an array of strings.(最长公共字串)Code:string merge(string&str1, string&str2) ...
分类:
其他好文 时间:
2015-09-01 12:25:02
阅读次数:
171
Longest Common Substring IITime Limit: 2000msMemory Limit: 262144KBThis problem will be judged onSPOJ. Original ID:LCS264-bit integer IO format:%lld J...
分类:
其他好文 时间:
2015-09-01 10:26:26
阅读次数:
219
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl...
分类:
其他好文 时间:
2015-09-01 08:01:08
阅读次数:
175
(LIS Longest Increasing Subsequence)给定一个数列,从中删掉任意若干项剩余的序列叫做它的一个子序列,求它的最长的子序列,满足子序列中的元素是单调递增的。例如给定序列{1,6,3,5,4},答案是3,因为{1,3,4}和{1,5,4}就是长度最长的两个单增子序列。处看...
分类:
其他好文 时间:
2015-08-31 17:09:00
阅读次数:
254
js获取地址栏参数 function GetQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.subs...
分类:
编程语言 时间:
2015-08-31 11:48:28
阅读次数:
163
Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecu...
分类:
编程语言 时间:
2015-08-30 23:15:40
阅读次数:
211
数据很小,直接将所有数存入数组,然后排序即可。
注意:只有最简分数才放入数组,因为如果它不是最简分数,则它化简后一定能在数组中找到...
分类:
编程语言 时间:
2015-08-30 19:41:08
阅读次数:
212
1040. Longest Symmetric String (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven a string, you are supposed to output the length of ...
分类:
其他好文 时间:
2015-08-30 06:25:40
阅读次数:
139
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:
编程语言 时间:
2015-08-29 22:58:51
阅读次数:
160
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ...
分类:
其他好文 时间:
2015-08-29 16:48:03
阅读次数:
173