Validate if a given string is numeric.
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to be ambiguo...
分类:
其他好文 时间:
2014-11-12 19:45:35
阅读次数:
201
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.
The Sudoku board could be partially filled, where empty cells are filled with the character '.'.
A partially fille...
分类:
其他好文 时间:
2014-11-12 17:55:20
阅读次数:
189
目前在学习Socket,因为和IO关系紧密,于是顺便也学了下IO
发现有这样一句话:
The flush method is valid on any output stream,but has no effect unless the stream is buffered
这句话意思是所有的输出流都有flush方法,但是仅对缓冲流有效
看到这里,笔者想到了自己写的serversocket...
分类:
编程语言 时间:
2014-11-12 11:53:08
阅读次数:
278
Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must clos...
分类:
其他好文 时间:
2014-11-11 22:24:21
阅读次数:
201
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:
其他好文 时间:
2014-11-09 20:44:22
阅读次数:
204
leetcode的第一题,回文数判断。原题如下:For example, "A man, a plan, a canal: Panama" is a palindrome. "race a car" is not a palindrome.Note: Have you consider that t...
分类:
其他好文 时间:
2014-11-09 19:33:04
阅读次数:
300
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:
其他好文 时间:
2014-11-09 16:41:17
阅读次数:
122
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana...
分类:
其他好文 时间:
2014-11-09 15:07:01
阅读次数:
129
Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem stat...
分类:
其他好文 时间:
2014-11-09 08:36:47
阅读次数:
155
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:
其他好文 时间:
2014-11-09 06:19:31
阅读次数:
173