You are viewing a single comment's thread. Return to all comments →
My Python Solution:
def levelOrder(self, root): stack = [root] while stack: node = stack.pop(0) if node: print(node.data, end=" ") stack.append(node.left) stack.append(node.right)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 23: BST Level-Order Traversal
You are viewing a single comment's thread. Return to all comments →
My Python Solution: