ฝึกคณิตศาสตร์ไม่ต่อเนื่อง

Monotonic Deque Prefix Sum

เรียกดูบทเรียน Monotonic Deque Prefix Sum ภายใน Algorithmic Thinking and Complexity

1 บทเรียน · 5 คำถาม

Algorithmic Thinking and Complexity

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

1 บทเรียน · 410 คำถาม

Monotonic Deque Prefix Sum

1 บทเรียน · 5 คำถาม

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.
เปิดบทเรียน