题目描述:
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
 determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" a...
                            
                            
                                分类:
其他好文   时间:
2014-11-18 11:54:07   
                                阅读次数:
173
                             
                    
                        
                            
                            
                                A message containing letters from A-Z is being encoded to numbers using the following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, determine the total numb...
                            
                            
                                分类:
其他好文   时间:
2014-11-17 19:29:21   
                                阅读次数:
213
                             
                    
                        
                            
                            
                                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-17 14:02:09   
                                阅读次数:
146
                             
                    
                        
                            
                            
                                题目描述:
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tr...
                            
                            
                                分类:
其他好文   时间:
2014-11-17 10:48:34   
                                阅读次数:
134
                             
                    
                        
                            
                            
                                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-17 09:12:02   
                                阅读次数:
179
                             
                    
                        
                            
                            
                                看到这个题目的时候,首先不认识 Determine这个单词,英文不好没办法,查了下是确认的意思,然后不懂 palindrome这个单词, 查了下是回文的意思。
问题是 回文是个什么东西,官方解释: A palindrome is
 a word, phrase, number,
 or other sequence of characters which
 reads the same b...
                            
                            
                                分类:
其他好文   时间:
2014-11-17 01:45:30   
                                阅读次数:
220
                             
                    
                        
                            
                            
                                关于这道题目,不得不感慨leetcode真的是一个不错的网站,之前的代码是有bug的,当时AC了,现在测试用例更加完善了,于是不能AC了。
题目描述:
Given a binary tree, determine if it is a valid binary search tree (BST).
Assume a BST is defined as follows:
The le...
                            
                            
                                分类:
其他好文   时间:
2014-11-16 23:08:48   
                                阅读次数:
362
                             
                    
                        
                            
                            
                                Word BreakGiven a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words....
                            
                            
                                分类:
其他好文   时间:
2014-11-16 21:31:07   
                                阅读次数:
173
                             
                    
                        
                            
                            
                                Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
                            
                            
                                分类:
其他好文   时间:
2014-11-16 07:06:02   
                                阅读次数:
151
                             
                    
                        
                            
                            
                                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-16 01:52:28   
                                阅读次数:
227