Skip to content

Latest commit

 

History

History
 
 

0108.convert-sorted-array-to-binary-search-tree

题目

Given an array where elements are sorted in ascending order, convert it to a height balanced BST.

解题思路

高度平衡二叉树是每一个节点的两个子树的深度差不能超过1。 见程序注释