Pregunta de entrevista de Amazon

Code question: how to compare two BST