Monotonic Queue (with Daily Temperatures & Largest Rectangle in Histogram)

What do you mean by monotonic queue?

Monotonic queue is a data structure where the data is entirely in non-decreasing order or entirely in non-increasing order. It is generally used for optimizing dynamic programming techniques. Monotonic queues can be used to solve problems that require us to find the greater/min/max till a particular window. We have explained the idea with 2 problems:

Daily Temperatures problemLargest Rectangle in HistogramImplementing non-increasing and non-decreasing mon...
 •  0 comments  •  flag
Share on Twitter
Published on April 21, 2021 00:08
No comments have been added yet.