Solution to build minimum height binary tree from sorted array