Skip to content
This repository has been archived by the owner on Oct 23, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1 from kiraknowsbest/postorder
Browse files Browse the repository at this point in the history
Postorder
  • Loading branch information
kiraknowsbest authored Oct 16, 2018
2 parents 2c8ecf8 + 88f2e2b commit 880ae20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions JavaScript/DFS/PreorderTraversal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const preorderDFS = (root, cb) => {
if (root) {
cb(root);
if (root.left) cb(root.left);
if (root.right) cb(root.right);
}
}
1 change: 1 addition & 0 deletions JavaScript/DFS/postorderTraversal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
postorderTraversal.js

0 comments on commit 880ae20

Please sign in to comment.