108. Convert Sorted Array to Binary Search Tree
Last updated
Was this helpful?
Last updated
Was this helpful?
time: O(n), must visit all nums element
space: O(n), must build all nums element, O(logn) for recursion stack, because use binary search idea