Created
June 29, 2018 11:24
-
-
Save boxgames1/15244bd9a29683f76538f5fc777a9e3f to your computer and use it in GitHub Desktop.
BinaryTreePostorder
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
postorder(node, fn) { | |
if (node !== null) { | |
this.postorder(node.left, fn); | |
this.postorder(node.right, fn); | |
fn(node); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment