adidas interview question

Revert a binary tree in C++