Pregunta de entrevista de Amazon

Coding question about binary search trees.