Validate if a given string is numeric.
分类:
其他好文 时间:
2014-07-10 00:16:51
阅读次数:
221
#!/usr/bin/env pythonimport wxclass MainWindow(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, title=title, si...
分类:
其他好文 时间:
2014-07-07 17:37:18
阅读次数:
142
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: int longestConsecutive(vector &num) { int len = num.size(); int max_cons = 0; int cur_cons = 0...
分类:
其他好文 时间:
2014-06-30 14:19:28
阅读次数:
159
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
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:
其他好文 时间:
2014-06-30 13:21:00
阅读次数:
202
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.Solution:public class Solution { public ...
分类:
其他好文 时间:
2014-06-30 12:18:25
阅读次数:
255
【题目】
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 unsorted array of integers, find the length of the longest consecutive elements sequence.
For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecutive elements sequence...
分类:
其他好文 时间:
2014-06-29 22:16:48
阅读次数:
239
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2014-06-29 20:28:58
阅读次数:
183