(node)
| 194 | |
| 195 | # Levelwise |
| 196 | def bfs(node): |
| 197 | queue = [] |
| 198 | if node: |
| 199 | queue.append(node) |
| 200 | while queue != []: |
| 201 | temp = queue.pop(0) |
| 202 | print(temp.info) |
| 203 | if temp.left: |
| 204 | queue.append(temp.left) |
| 205 | if temp.right: |
| 206 | queue.append(temp.right) |
| 207 | |
| 208 | |
| 209 | def preorder_itr(node): |