posted @ 2014-05-27 04:17 卢泽尔 阅读(759) 评论(0) 推荐(0)
摘要:
Problem Link:https://oj.leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/This problem can be easily solved using recur... 阅读全文
摘要:
Problem Link:https://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/Use BFS from the tree root to traverse the tree level by level. The... 阅读全文
posted @ 2014-05-27 02:22 卢泽尔 阅读(177) 评论(0) 推荐(0)
摘要:
Problem Link:http://oj.leetcode.com/problems/convert-sorted-array-to-binary-search-tree/Same idea to Convert Sorted Array to Binary Search Tree, but w... 阅读全文
posted @ 2014-05-22 06:46 卢泽尔 阅读(165) 评论(0) 推荐(0)
摘要:
Problem Link:http://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/We design a auxilar function that convert a linked list to a no... 阅读全文
posted @ 2014-05-14 01:06 卢泽尔 阅读(185) 评论(0) 推荐(0)
摘要:
Problem Link:http://oj.leetcode.com/problems/balanced-binary-tree/We use a recursive auxilar function to determine whether a sub-tree is balanced, if ... 阅读全文
posted @ 2014-05-14 00:19 卢泽尔 阅读(361) 评论(0) 推荐(0)
摘要:
Problem Link:http://oj.leetcode.com/problems/minimum-depth-of-binary-tree/To find the minimum depth, we BFS from the root and record the depth. For ea... 阅读全文
posted @ 2014-05-13 22:53 卢泽尔 阅读(144) 评论(0) 推荐(0)
摘要:
Problem Link:http://oj.leetcode.com/problems/path-sum-ii/The basic idea here is same to that of Path Sum. However, since the problem is asking for all... 阅读全文
posted @ 2014-05-13 22:46 卢泽尔 阅读(190) 评论(0) 推荐(0)
摘要:
Problem Link:http://oj.leetcode.com/problems/path-sum/One solution is to BFS the tree from the root, and for each leaf we check if the path sum equals... 阅读全文
posted @ 2014-05-13 22:39 卢泽尔 阅读(242) 评论(0) 推荐(0)
摘要:
Problem Link:http://oj.leetcode.com/problems/flatten-binary-tree-to-linked-list/The problem is asking for flatterning a binary tree to linked list by ... 阅读全文
posted @ 2014-05-13 22:19 卢泽尔 阅读(152) 评论(0) 推荐(0)
摘要:
Problem Link:http://oj.leetcode.com/problems/distinct-subsequences/A classic problem using Dynamic Programming technique.Let m and n be the length of ... 阅读全文
posted @ 2014-05-13 11:07 卢泽尔 阅读(174) 评论(0) 推荐(0)
浙公网安备 33010602011771号