Iterative Inorder Traversal (Non Recursive ) algorithm prints the inorder traversal of a binary tree. Link for Shortcut trick to Inorder traversal :- • Inorder Traversal (Sho...
segmentation fault is due to pop(). pop() returns void so getting segmentation fault. So take top element from stack and assign it to p and print the value rest continue
Thanks for sharing the videos, I found Inorder and preorder iterative traversal videos but not Post order traversal, could you please upload post order iterative video as well.
Love u Sir No word speechless ur all data structure session but is it possible after explaining the concept to run all the code on ur laptop then very helpful to the every one who is watched ur channel ? Interview Prospective
Hi Kindly organize your videos into appropriate playlists, it would be easy for us to find them and go through the similar topics in the playlist and complete the learning in a more organized way ... Many thanks you rock
sir very good videos your videos are really awesome sir but you are saying that you upload videos everyday but it is not so sir try to upload the video everyday as it will be benificial for both of us thank u sir ???
def travers(self): stack = [] current = self.root while True: while current: stack.append(current) current = current.left if stack: current = stack.pop(0) print(current) current = current.right print(stack) if stack is None: break First of all, thanks for the lessons. Unfortunately, the cycle does not end. Debug 'if stack is None: break ' code is bypasses. Although the stack is empty, it does not end the cycle. I wonder why. Thank you . respects