Question d’entretien chez Amazon

Leetcode questions. Both medium. One binary search based and one tree based.