Bloomberg interview question

The coding question about BST