CTCI 4.5 check BST