The sliding window minimum algorithmrichardhartersworld.com 3 pointsobjectivefs13 years ago1 commentSaveHideCopy link On HNComments−twiceaday13yThis reminds me of the following problem:Given a list of numbers, for each number n print (n, k) where k is the first number following n that is larger than n.There is a linear solution
Comments
This reminds me of the following problem:
Given a list of numbers, for each number n print (n, k) where k is the first number following n that is larger than n.
There is a linear solution