image Range min]/Range argmin sliding in one direction can be realized with [priority queue

  • Put (value, location) in priority queue
  • Add new entries to the range to the queue
  • When the minimum value is read, if it is out of range, just skip the reading.

PAST2L


This page is auto-translated from [/nishio/スライドRange Argminを優先度キューで](https://scrapbox.io/nishio/スライドRange Argminを優先度キューで) using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.