Skip to content

Instantly share code, notes, and snippets.

@thatguyintech
Created April 13, 2017 00:16
Show Gist options
  • Save thatguyintech/051bbe285f0575a40aca02c54bc0be3a to your computer and use it in GitHub Desktop.
Save thatguyintech/051bbe285f0575a40aca02c54bc0be3a to your computer and use it in GitHub Desktop.
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