Skip to content

Commit 0909153

Browse files
committed
Adds time complexity notes for 938
1 parent e833876 commit 0909153

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

938. Range Sum of BST .playground/Contents.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class TreeNode {
2626
# Complexity
2727
- Time complexity:
2828
O(log n) where `n` is `root.nodes.size`
29+
O(n) where all nodes values are in the range `low...high`
2930

3031
- Space complexity:
3132
O(1) or O(n) where `n` is the depth of the call stack

0 commit comments

Comments
 (0)