Hi..One question. If there is no left in one level for a node, then CalHeigth(root.left,height) --> in this root.left is null so root == null will be checked in recursion right? will it not return result without checking if next node has left or right?
it will return to the point after calHeight(root.left) was called. so it will still go for calHeight(root.right). That is how recursion will work. it will return back to the point after the call was made. it wont exit the entire function. hope i was able to solv ur doubt?
Super bro
🙌
Hii bro can you put a video on stadium seat booking system with sql and python ...plss 🙏🙏
Level order traversal use pannalam bro for o(1) space.. Great explanation bro💥
yes, level order traversal also will work. but recursion la keta we can use DFS. ✌
@@AlgoTamizha bro dp problems epdi bro solve panrathu
Hi..One question. If there is no left in one level for a node, then CalHeigth(root.left,height) --> in this root.left is null so root == null will be checked in recursion right? will it not return result without checking if next node has left or right?
it will return to the point after calHeight(root.left) was called. so it will still go for calHeight(root.right). That is how recursion will work. it will return back to the point after the call was made. it wont exit the entire function. hope i was able to solv ur doubt?
Bro zoho oda adv pgm question -air trafic control program bro panna mutiyuma??
will try for sure 😄
Bro main function code epdi bro