HackerEarth Subtree swap problem solution - TheCScience