The sliding window minimum algorithm(richardhartersworld.com)3 points·by objectivefs·13 ปีที่แล้ว·1 commentsrichardhartersworld.comThe sliding window minimum algorithmhttp://richardhartersworld.com/cri/2001/slidingmin.html1 commentsPost comment[–]twiceaday·13 ปีที่แล้วreplyThis 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
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