Subsequence
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 9422
Accepted: 3797
Description
A sequence of N positive integers (10 < N < 100 000), each of t...
分类:
其他好文 时间:
2015-05-07 08:50:45
阅读次数:
128
Maximum Gap问题:Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/s...
分类:
其他好文 时间:
2015-05-07 00:49:56
阅读次数:
146
原题地址LCD,经典动归,O(n^2)复杂度因为要输出子序列,所以啰嗦一些 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 #define MAX_...
分类:
其他好文 时间:
2015-05-07 00:45:34
阅读次数:
107
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 leaf node.
基本思路:
深度优先遍历。
在leetcode上实行执行时间...
分类:
其他好文 时间:
2015-05-06 23:08:25
阅读次数:
184
DescriptionGiven a 2-dimensional array of positive and negative integers, find the sub-rectangle with the largest sum. The sum of a rectangle is the s...
分类:
其他好文 时间:
2015-05-06 22:28:44
阅读次数:
144
题目传送门 1 /* 2 最大子矩阵和:把二维降到一维,即把列压缩;然后看是否满足最大连续子序列; 3 好像之前做过,没印象了,看来做过的题目要经常看看:) 4 */ 5 #include 6 #include 7 #include 8 #include 9 using na...
分类:
其他好文 时间:
2015-05-06 20:57:56
阅读次数:
128
Problem:
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.
Soluti...
分类:
编程语言 时间:
2015-05-06 17:58:34
阅读次数:
183
控制显示区域各种属性: width - viewport的宽度height – viewport的高度initial-scale - 初始的缩放比例minimum-scale - 允许用户缩放到的最小比例maximum-scale – 允许用户缩放...
分类:
移动开发 时间:
2015-05-06 17:28:39
阅读次数:
294
题目:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest...
分类:
其他好文 时间:
2015-05-06 17:07:28
阅读次数:
140
题意:LCM……最长公共子序列……不想解释了解法:这题只需要求长度,所以显而易见(对没错我就是来装×的),方程为dp[i][j] = {dp[i - 1][j - 1] + 1(s1[i] == s2[i]), max(dp[i - 1][j], dp[i][j - 1])}。好吧还是解释一下……d...
分类:
其他好文 时间:
2015-05-06 12:34:34
阅读次数:
108