Amazon Interview Question

How can you construct a balanced binary search tree when you're given a sorted array.

Interview Answer

Anonymous

Jan 15, 2021

create a recursive function that sets the parent node to the midpoint array and the left child is the recursive call of first half of the array, right child is 2nd half of the array.