Skip to content
ı
Workspace
Visualizer
Search anything…
⌘ K
Desk
Path
Problems
Review
More
Library
/
Prefix Sum Array
arrays
Best
O(n)
Avg
O(n)
Worst
O(n)
Space
O(n)
Preparing Prefix Sum Array...
Precomputes cumulative running sums to answer range sum queries in constant O(1) time.