Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c74a408

Browse files
updated
1 parent 03f9f82 commit c74a408

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Data-Structures/Tree/TreeTraversal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// O(n) Time and O(n) Space Complexity
32

43
function inOrderTraverse (tree, array) {
@@ -9,6 +8,7 @@ function inOrderTraverse (tree, array) {
98
}
109
return array
1110
}
11+
1212
function preOrderTraverse (tree, array) {
1313
if (tree !== null) {
1414
array.push(tree.value)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /