Recover binary search tree