Day 22 of LeetCode
Documenting LeetCode solving.
Q66
239. Sliding Window Maximum
Hard. Max Queue
type MotionicQueue struct {
maxq []int
}
// Smash items that are smaller and before
func (mq *MotionicQueue) push(x int) {
for len(mq.maxq) > 0 && mq.maxq[len(mq.m...
evelynsjourney.hashnode.dev4 min read