摘要: Question:Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The fl... 阅读全文
posted @ 2015-08-07 23:28 YoungAndSimple 阅读(105) 评论(0) 推荐(0) 编辑
摘要: // 95 return all unique BST roots.public ArrayList generateTrees(int n) { // 2nd ans // Start typing your Java solution below //... 阅读全文
posted @ 2015-08-05 08:03 YoungAndSimple 阅读(157) 评论(0) 推荐(0) 编辑
摘要: The Kth smallest element in a BST 阅读全文
posted @ 2015-08-04 08:11 YoungAndSimple 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 1 public class Solution { 2 public List> levelOrder(TreeNode root) { 3 List> res = new ArrayList>(); 4 if(root == null) return ... 阅读全文
posted @ 2015-08-04 05:13 YoungAndSimple 阅读(156) 评论(0) 推荐(0) 编辑