Min Li's Note
KVM,QEMU, X86 virtualization
Pages
Home
Collection
About
Monday, November 24, 2014
Convert Sorted List to Binary Search Tree
Problem
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
Idea
递归的方法解这个题目,注意递归的终止条件,左子树和右子树递归的边界
Solution
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment