Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo ...
分类:
其他好文 时间:
2016-09-24 07:01:04
阅读次数:
144
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l ...
分类:
其他好文 时间:
2016-09-23 06:36:21
阅读次数:
178
传送门 Description There is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference b ...
分类:
其他好文 时间:
2016-09-22 13:17:43
阅读次数:
235
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 longes ...
分类:
其他好文 时间:
2016-09-20 06:49:11
阅读次数:
141
Write a function to find the longest common prefix string amongst an array of strings. 让我们在一个字符串中找出所有字符串的共同前缀 ...
分类:
其他好文 时间:
2016-09-19 01:03:18
阅读次数:
171
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2016-09-17 00:32:49
阅读次数:
152
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l ...
分类:
其他好文 时间:
2016-09-16 19:40:27
阅读次数:
98
传送门 Description A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any ...
分类:
其他好文 时间:
2016-09-16 00:16:11
阅读次数:
138
原博文:传送门 最长递增子序列(Longest Increasing Subsequence) 下面我们简记为 LIS。假设存在一个序列d[1..9] = 2 1 5 3 6 4 8 9 7,可以看出来它的LIS长度为5。下面一步一步试着找出它。我们定义一个序列B,然后令 i = 1 to 9 逐个 ...
分类:
编程语言 时间:
2016-09-16 00:08:32
阅读次数:
282