Arm Interview Question

Write an algorithm that inverts a binary tree.