(LIS Longest Increasing Subsequence)给定一个数列,从中删掉任意若干项剩余的序列叫做它的一个子序列,求它的最长的子序列,满足子序列中的元素是单调递增的。例如给定序列{1,6,3,5,4},答案是3,因为{1,3,4}和{1,5,4}就是长度最长的两个单增子序列。处看...
分类:
其他好文 时间:
2015-08-31 17:09:00
阅读次数:
254
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
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
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is 3....
分类:
其他好文 时间:
2015-08-29 06:21:42
阅读次数:
190
DescriptionSome positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given pos...
分类:
其他好文 时间:
2015-08-28 19:27:36
阅读次数:
137
Write a function to find the longest common prefix string amongst an array of strings.class Solution { public: string longestCommonPrefix(vect...
分类:
其他好文 时间:
2015-08-28 12:47:23
阅读次数:
138
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 39374
Accepted: 17315
Description
A numeric sequence of ai is ordered if
a1 a2 a...
分类:
其他好文 时间:
2015-08-27 16:42:39
阅读次数:
114
https://leetcode.com/problems/longest-substring-without-repeating-characters/思路:从某点结束所能取到的最早开头是到目前出现倒数第二次的字符的最末位置后一位如图:(S代表起点,T代表终点)abcabcab**S*T假设现在在...
分类:
其他好文 时间:
2015-08-27 13:11:45
阅读次数:
153