Solutions for Binary Tree Problems