Range Addition — Difference Array & Sweep

Apply a batch of adjustments, each adding to a span of bins, to a row that starts empty, and report the final contents.

Difference Array & Sweep · Medium

More in Difference Array & Sweep

All algorithm problems