solved [balanced binary tree]