You are viewing a single comment's thread. Return to all comments →
def levelOrder(self,root): nodes = list() nodes.append(root) for e in nodes: print(e.data, end = " ") if e.left is not None: nodes.append(e.left) if e.right is not None: nodes.append(e.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 →