cpp implementation of Recover Binary Search Tree