added a tool for reconstructing binary tree