Skip to content

Commit 2f4efa0

Browse files
author
Joseph Luce
authored
Update 094_binary_tree_inorder_traversal.md
1 parent 2579cc4 commit 2f4efa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

leetcode/medium/094_binary_tree_inorder_traversal.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Recursive solution
44
- Runtime: O(N)
5-
- Space: O(1)
5+
- Space: O(N)
66
- N = Number of elements in tree
77

88
Inorder traversal is left -> node -> right.
@@ -27,7 +27,7 @@ class Solution:
2727

2828
## Iterative solution
2929
- Runtime: O(N)
30-
- Space: O(1)
30+
- Space: O(N)
3131
- N = Number of elements in tree
3232

3333
By using a stack, we mimic what the computer would do when it does this recursively.

0 commit comments

Comments
 (0)