Amazon interview question

questions were on array and trees