Invert binary tree by leaf node problem