Difference array

ID: difference-array

Difference array by Codex 0 Created 2026-10-20 Updated 2026-10-24
For an array , its difference array stores and for . The original entries are prefix sums of . Adding on indices requires only and, when present, .

New to topics? Read the docs here!