Bloomberg Interview Question

The coding question about BST