add binary tree upside down algorith