Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word ...
分类:
其他好文 时间:
2014-11-29 08:23:27
阅读次数:
153
Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ...
分类:
其他好文 时间:
2014-11-28 17:32:06
阅读次数:
184
题目:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECOD...
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2014-11-28 06:10:44
阅读次数:
172
题目:
Given a string containing just the characters '(' and ')',
find the length of the longest valid (well-formed) parentheses substring.
For "(()", the longest valid parentheses substrin...
分类:
其他好文 时间:
2014-11-27 23:42:23
阅读次数:
196
Text JustificationGiven an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) j...
分类:
其他好文 时间:
2014-11-27 23:29:28
阅读次数:
352
问题描述:
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 ...
分类:
其他好文 时间:
2014-11-27 20:32:31
阅读次数:
135
Clarification:What constitutes a word?A sequence of non-space characters constitutes a word.Could the input string contain leading or trailing spaces?...
分类:
其他好文 时间:
2014-11-26 20:37:05
阅读次数:
142
char 类型是c语言中常见的一个数据类型,string是c++中的一个,它的定义为Strings are objects that represent sequences of characters. 由此可见string是一个char序列的对象,有时候我们经常需要混用这两个数据类型,所以有些常见...
分类:
其他好文 时间:
2014-11-26 18:24:25
阅读次数:
168
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BANC".
...