IBM interview question

Inverse a binary tree and optimize it.