Created
April 13, 2017 00:16
-
-
Save thatguyintech/051bbe285f0575a40aca02c54bc0be3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
counter = 0 | |
def inorder(node): | |
if node: | |
inorder(node.left) | |
visit(node) | |
inorder(node.right) | |
def visit(node): | |
node.label = counter | |
counter += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment