Skip to content

Commit 2353bcf

Browse files
committed
add complexity
1 parent c57851f commit 2353bcf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Stack/histogram.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ when we push an index i into stack
131131
when top of stack is < curr_el
132132
the item below it, is prev smaller of it
133133
when we pop item of stack,
134+
135+
Time: O(n)
136+
Space: O(n)
134137
*/
135138

136139
int getMaxHistogramArea_eff(int arr[], int n)

0 commit comments

Comments
 (0)