We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2033c26 commit 8ee3bc0Copy full SHA for 8ee3bc0
Medium/456. 132 Pattern/README.md
@@ -23,6 +23,6 @@ We also keep track of the '3' candidate as 'third'. If we encounter a number sma
23
If the current number is greater than the top of the stack, it becomes a potential '3' candidate, and we update 'third'.
24
Finally, we push the current number onto the stack for potential future '2' candidates.
25
26
-# Complexity
+### Complexity
27
- Time complexity: O(n), where n is the length of the 'nums' list.
28
- Space complexity: O(n), as the stack can potentially hold all elements of the 'nums' list.
0 commit comments