Skip to content

Instantly share code, notes, and snippets.

@boxgames1
Last active June 29, 2018 11:25
Show Gist options
  • Save boxgames1/d4160f8b41b10cb3790344778bc58b03 to your computer and use it in GitHub Desktop.
Save boxgames1/d4160f8b41b10cb3790344778bc58b03 to your computer and use it in GitHub Desktop.
BinaryTreeInorder
inorder(node, fn) {
if (node !== null) {
this.inorder(node.left, fn);
fn(node);
this.inorder(node.right, fn);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment