Is Balanced problem

My code is not passing all the test cases
please correct it

hello @Megha2468


u r not updating ur height inside this if statement.

add statement to update height inside this if statement.
and then try