Genpact interview question

Write a program to invert a binary tree