check BST balanced