摘要:
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t... 阅读全文
摘要:
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.题意:给定一个有序的链表,将其转换成平衡二叉搜索树思路: 二分法要构建一个平衡二叉... 阅读全文