package
0.0.0-20241220224003-b7cf03a90b2b
Repository: https://github.com/szhou12/leetcode-go.git
Documentation: pkg.go.dev
# README
108. Convert Sorted Array to Binary Search Tree
Solution idea
Recursion
Input array 升序排列,而BST in-order traversal产生升序排列的数组.
故,Key Oberservation: input array的mid就是BST的根结点
Time complexity = $O(\log n)$