739. Daily Temperatures

naive - two pointers
T: O(n^2)
T: O(n), with ans result
mono stack (decresing, 注意要判斷 decresing or increasing
T: O(n)
S: O(n), with ans result and stack
Array, Optimized Space
no stack
T: O(n)
S: O(n), with ans result
Previous1996. The Number of Weak Characters in the GameNext84. Largest Rectangle in Histogram ( mono increasing stack
Last updated
Was this helpful?