Monotonic Queue/Stack

https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k/discuss/204290/Monotonic-Queue-Summary

The following question can be solved by monotonic queue:

  • LC84. Largest Rectangle in Histogram

  • LC239. Sliding Window Maximum

  • LC739. Daily Temperatures

  • LC862. Shortest Subarray with Sum at Least K

  • LC901. Online Stock Span

  • LC907. Sum of Subarray Minimums

Last updated