Amazon Interview Question

Invert a binary tree in linear time