Https://ide.codingblocks.com/s/293157

what is the problem in my code please tell. is there any problem in the logic?

hello @jatin_wadhwa

r u getting WA or tle?

all test cases are wrong. i am not able to understand the error

ur size function was not correc.t
it shuld be 1+left + right.

check ur updated code here >

but here you are counting the no of nodes.but we have to calculate the height of the bst right?

u need to print size of three na.

chekc ur updated code. u will get it .

i checked the code properly sir you are counting total no of nodes of a bst and i am not able to understand why are you counting all the nodes of a bst. please explain that

image

oh…got it . thanks