Code for problem "Balanced Binary Tree".