Is it balanced?
Premium Content - Free Preview
Can you check if a tree is a height-balanced?
In this challenge, a tree is height-balanced if the maximum and minimum path from any node to a terminal (null node) descendant differs my at most 1.
End of Free Content Preview. Please Sign in or Sign up to buy premium content.
Comments
Learneroo
Mar 12, 11:48 PMHere's some code to set up the tree in Java so you can just do the algorithm.