update solution for binary tree upside down.