Plz, have a look at my code…
hello @rabhi1611
here u need to find number of nodes in ur current subtree instead of height.
ooh, thanks, it works.