Solved convert sorted array to binary search tree problem.