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 does not exist, return 0.
Note: A word is defi...
分类:
其他好文 时间:
2014-10-27 14:26:12
阅读次数:
249
Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets m...
分类:
其他好文 时间:
2014-10-26 22:31:27
阅读次数:
438
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 "BAN...
Given 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) justified.
You should pack your words in a greedy approach; that i...
分类:
其他好文 时间:
2014-10-26 17:05:25
阅读次数:
175
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 val...
分类:
其他好文 时间:
2014-10-26 17:02:49
阅读次数:
142
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2014-10-26 14:18:54
阅读次数:
158
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover t...
分类:
其他好文 时间:
2014-10-26 13:08:38
阅读次数:
172
【题意】
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-10-26 11:49:53
阅读次数:
203
Given a string containing just the characters '(' and ')',
find the length of the longest valid (well-formed) parentheses substring.
For "(()", the longest valid parentheses substring is "()",
...
分类:
其他好文 时间:
2014-10-26 11:49:43
阅读次数:
185
问题描述:
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is...
分类:
其他好文 时间:
2014-10-25 21:30:51
阅读次数:
191