Zenatix Interview Question

algorithm and working code for inverting a binary tree.