![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 277 阅读 · 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 · 305 阅读 · 0 评论