Skip to content

Instantly share code, notes, and snippets.

@boxgames1
Created June 29, 2018 11:24
Show Gist options
  • Save boxgames1/15244bd9a29683f76538f5fc777a9e3f to your computer and use it in GitHub Desktop.
Save boxgames1/15244bd9a29683f76538f5fc777a9e3f to your computer and use it in GitHub Desktop.
BinaryTreePostorder
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