Arm interview question

Write an algorithm that inverts a binary tree.