题目: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 onl...
分类:
其他好文 时间:
2014-05-23 12:20:50
阅读次数:
407
Dfs:大部分是直接递归枚举,即求满足约束条件下的解,虽不用剪枝,但也需要代码能力。练习递归枚举的题目:1241
Oil Deposits (dfs的连通块个数)1016 Prime Ring Problem1584
蜘蛛牌(简单dfs,简单的剪枝,还有人用DP做(???))1426 Sudoku ...
分类:
其他好文 时间:
2014-05-23 02:54:33
阅读次数:
301
【题目】
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 filled sudoku which is valid.
Note:
A valid Sudoku board (par...
分类:
其他好文 时间:
2014-05-22 09:58:54
阅读次数:
234
11行制造了一个手机,手机名为wechatCallbackapiTest,这个手机有三个功能,一个功能是valid(),它的作用是签名和接口验证;另一个函数叫responseMsg(),这个该手机最重要的功能,就跟打电话一样;最后一个功能是checkSignature(),它是用来验证签名的。...
分类:
微信 时间:
2014-05-22 07:02:37
阅读次数:
606
Evaluate the value of an arithmetic expression
inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an
integer or another express...
分类:
其他好文 时间:
2014-05-22 00:49:57
阅读次数:
311
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-05-21 21:20:54
阅读次数:
291
Valid Parentheses括号匹配问题...
分类:
其他好文 时间:
2014-05-21 16:02:30
阅读次数:
161
5道题目分别是:【Largest Rectangle in Histogram】、【Minimum Path Sum】、【Jump Game】、【Jump Game II 】、【Valid Number】,由于有一些题目不需要发一整篇博文来记录,所以就将这些题目以一篇博文5道来记录。...
分类:
其他好文 时间:
2014-05-21 03:05:33
阅读次数:
481
【题目】
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character '.'.
You may assume that there will be only one unique solution.
A sudoku puzzle...
...and its solution numbers marked in red.
...
分类:
其他好文 时间:
2014-05-20 17:07:34
阅读次数:
335
【题目】
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 "()", which has length = 2.
Another example is ")()())", whe...
分类:
其他好文 时间:
2014-05-20 16:39:07
阅读次数:
280