I was building on oncall scheduling tool for work, and I needed to apply schedule overrides to the default oncall rotation. But I also wanted to support multiple, overlapping overrides, and always pick the correct (latest) override for the given time.
I realized that it's like a queue, but I needed to sort the entries in the queue every time I added a new one.
Thus, I invented priority queues!