You're the best. I know recursive tracing takes a long time and can be annoying, but I really wish more professors would go through the processes like this.
Thank you so much 😀 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
sir can you please tell me why we use return -1 instead of return 0 in height function and return left + 1 or right + 1 instead of return left and right.
you can also think of it as, the height of the leaf node it self is 0 , so you return -1 for left node of the leaf node ,and -1 for the right node of the leaf node max(-1,-1)+1 --> 0 , so the height of leaf nodes is 0
Are we supposed to visualise this complex step by step process everytime we write recursion? Or just write recursion based on intution, getting some idea what it does but not knowing exactly how it does?
My manager is the type of man that most people would like to invest with, he's not the best of all. But it's more about what he knows about the market and his predictions are accurate. You can try to see for yourself.