تمرین ریاضیات گسسته

Monotonic Deque Prefix Sum

Browse Monotonic Deque Prefix Sum lessons inside Algorithmic Thinking and Complexity.

1 lessons · 5 questions

Algorithmic Thinking and Complexity

Big-O, loop analysis, graph algorithms, invariants, and developer-focused discrete math.

1 lessons · 410 questions

Monotonic Deque Prefix Sum

1 lessons · 5 questions

Least You Need to Know: Monotonic Deques, Prefix Sums, and Shortest Valid Windows

Some subarray problems use prefix sums plus a monotonic deque over prefix indices. The deque keeps promising earlier prefixes in increasing order so the current prefix can quickly detect the shortest earlier start that already makes the sum large enough.

باز کردن درس