Check if the given binary tree is balanced