Convert Sorted Array to Balanced BST
Easy
Binary Search Tree
Convert a sorted array into a height-balanced BST by always choosing the middle element (the upper middle if the length is even) as the root, and print it in level-order.
Constraints
1 <= n <= 10^4 -10^4 <= nums[i] <= 10^4
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.