update solution for Balanced Binary Tree