Apple interview question

Coding question on Binary Search Trees.