Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are
all va...
分类:
其他好文 时间:
2015-01-09 09:16:29
阅读次数:
149
Problem Description lxhgww got a sequence contains n characters which are all '0's or '1's. We have five operations here: Change operations: 0 a...
分类:
其他好文 时间:
2015-01-08 14:59:13
阅读次数:
288
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. Fo...
分类:
其他好文 时间:
2015-01-07 23:40:19
阅读次数:
305
1811. Longest Common SubstringProblem code: LCSA string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the set o...
分类:
其他好文 时间:
2015-01-07 23:22:12
阅读次数:
154
100 Characters Remaining.
分类:
其他好文 时间:
2015-01-07 14:50:31
阅读次数:
165
Read N Characters Given Read4
Total Accepted: 960
Total Submissions: 3775
The API: int read4(char *buf) reads 4 characters at a time from a file.
The return value is the actual number of char...
分类:
其他好文 时间:
2015-01-06 15:38:42
阅读次数:
222
Given a string, find the length of the longest substring T that contains at most 2 distinct characters.
For example, Given s = “eceba”,
T is "ece" which its length is 3.
这题的线性解法是维护一个sliding w...
分类:
其他好文 时间:
2015-01-06 07:20:32
阅读次数:
121
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan...
分类:
其他好文 时间:
2015-01-05 07:02:29
阅读次数:
229
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-01-05 00:18:13
阅读次数:
147
Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must clos...
分类:
其他好文 时间:
2015-01-04 22:44:54
阅读次数:
263