Longest Valid Parentheses 最长有效括号对...
分类:
其他好文 时间:
2014-06-05 01:16:14
阅读次数:
215
Given a string, find the length of the longest
substring without repeating characters. For example, the longest substring
without repeating letters fo...
分类:
其他好文 时间:
2014-05-30 23:46:09
阅读次数:
453
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 ...
分类:
其他好文 时间:
2014-05-30 16:20:32
阅读次数:
229
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 le...
分类:
其他好文 时间:
2014-05-30 15:03:42
阅读次数:
237
其实这个题我还不会,学长给了一个代码交上去过了,据说用到了一种叫做位压缩的技术,先贴代码吧,以后看懂了再来写#include
#include #define M 30005#define SIZE 128#define WORDMAX 3200#define BIT 32char
s1[M], s...
分类:
其他好文 时间:
2014-05-29 18:07:53
阅读次数:
549
??
1、Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter...
分类:
其他好文 时间:
2014-05-26 05:03:19
阅读次数:
172
code如下:
//Longest common sequence, dynamic programming method
void FindLCS(char *str1, char *str2)
{
if(str1 == NULL || str2 == NULL)
return;
int length1 = strlen(str1)+1;
int length2 = strlen(...
分类:
其他好文 时间:
2014-05-26 04:56:50
阅读次数:
215
题目一:
Given a binary tree containing digits from 0-9 only, each root-to-leaf
path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Fin...
分类:
其他好文 时间:
2014-05-26 04:06:41
阅读次数:
248
Sum of Consecutive Prime NumbersTime Limit:
1000MSMemory Limit: 65536KTotal Submissions: 18427Accepted: 10122DescriptionSome
positive integers can be....
分类:
其他好文 时间:
2014-05-24 10:32:00
阅读次数:
266