Arrays and searching 0/120

Sliding window · 2 of 2

Monotonic queue

Keep a moving window's maximum and minimum with two deques of indices, so the whole scan takes linear time.

2,030 words · 10 min read

0 of 1 solved

Difficulty: how hard each problem is if its topic is new to you.

Core 1