
Tree
不刷脸皮要刷题
这个作者很懒,什么都没留下…
展开
-
Flatten Binary Tree to Linked List
1. Inorder flatten: public class Solution { TreeNode prev = null; public void flatten(TreeNode root) { if (root == null) { return; } TreeNode rightnode =转载 2014-11-13 04:36:09 · 294 阅读 · 0 评论 -
Convert Sorted List to Binary Search Tree
Inorder逆向思维 //inorder public class Solution { ListNode list; public TreeNode sortedListToBST(ListNode head) { int len = 0; ListNode node = head; while (node != null) {转载 2014-11-13 04:56:49 · 331 阅读 · 0 评论