Stacks, Queues and Monotonic Stacks
Pick a stack, queue or monotonic stack from the problem's order of work, and solve next-greater and window-maximum questions in O(n).
About 9 min. Pro opens the whole course. Current prices are on the pricing page.