EPI (Python) 9.1 Is tree balanced - Solution is incorrect?

#1

I tested this against leetcode 110, and it failed the case [1,2,2,3,null,null,3,4,null,null,4]

i.e. balanced at root, but only left and right children below.

I think it is because the base case is too lenient. If tree is None, it automatically marks as balanced.

Can somebody please confirm?

Thanks

0 Likes