Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
給一個經過漸增排序後的陣列,將它轉換為高度平衡的二元搜索樹(BST)。
對於這個問題,一個高度平衡的二元樹被定義為所有節點的兩個子樹,高度相差都不大於1的二元樹。
LeetCode
C++