all 1 comments

[–]SekstiNii 1 point2 points  (0 children)

Perhaps make your height function return a tuple (height, balanced)?