gudni12345
asked on
Semi - balanced binary tree.
How do I write a recursive algorithm that checks whether a binary search
tree is semi-balanced.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if node.isleaf then
return 1
elseif balancedheight(node.left)>
return 1+max(balancedheight(node.
else
return 0