Skip to content
Leetcode
Esc
↑↓navigate↵open⌘Jpreview

Prefix Sum

A running total is stored at each index, so the sum of any range is one subtraction.

Last updated on September 24, 2026

Was this page helpful?