95: Convert sorted array into a binary search tree

Given sorted array in ascending order, return a height-balanced binary search tree

Note: height-balanced binary tree is a binary tree in which the depth of the two subtrees of every node never differs by more than 1

 

Example 1

Input:   [1, 2, 3]

Output:      2
            / \
           1   3

Example 2

Input:   [0, 1, 2, 3] 

Output:       1
             / \
            0   2
                 \
                  3
Difficulty:Easy
Topic:Tree
Problem #:95