Validate if a given string is numeric.
分类:
其他好文 时间:
2014-07-10 00:16:51
阅读次数:
221
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.
分类:
其他好文 时间:
2014-07-07 23:16:20
阅读次数:
274
Problem Description:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a...
分类:
其他好文 时间:
2014-07-07 16:03:32
阅读次数:
168
Problem Description:Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Ret...
分类:
其他好文 时间:
2014-07-07 15:55:48
阅读次数:
208
The operators we have seen so far are all special characters like + and *, but there are a few operators that are words. in is a boolean operator that...
分类:
其他好文 时间:
2014-07-07 15:39:31
阅读次数:
246
Problem Description:Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integ...
分类:
其他好文 时间:
2014-06-30 14:32:54
阅读次数:
151
class Solution {public: bool isPalindrome(string s) { int len = s.length(); //if (len -1 && !(b = check2lower(s[q])) ); i...
分类:
其他好文 时间:
2014-06-30 13:43:33
阅读次数:
178
【题目】
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.
Return all such possible sentences.
For example, given
s = "catsanddog",
dict = ["cat", "cats", "and", "sand", "dog...
分类:
其他好文 时间:
2014-06-30 00:51:41
阅读次数:
295
题目
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 approa...
分类:
其他好文 时间:
2014-06-29 23:44:02
阅读次数:
357
题目
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 wi...