Last active
June 29, 2018 11:25
-
-
Save boxgames1/d4160f8b41b10cb3790344778bc58b03 to your computer and use it in GitHub Desktop.
BinaryTreeInorder
This file contains 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
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