Problem Description
Given an array where elements are sorted in ascending order, convert it to a height Balanced Binary Search Tree (BBST).
Balanced tree : 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.
1 <= length of array <= 100000
First argument is an integer array A.
Return a root node of the Binary Search Tree.
Input 1:
A : [1, 2, 3]
Input 2:
A : [1, 2, 3, 5, 10]
Output 1:
2 / \ 1 3
Output 2:
3 / \ 2 5 / \ 1 10
Explanation 1:
You need to return the root node of the Binary Tree.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.