Added solution to check if bst is balanced