Solved isBalanced (p 80)