Skip to main content

Prefix Array

This page provides links to solutions that use the Prefix Array.

Overview

A prefix array, also known as a prefix sum array or cumulative sum array, is an array where each element at an index stores the sum of all elements preceding it, including itself. Prefix arrays are often used to efficiently compute cumulative sums for various ranges within the original array.

How to Spot These Problems

You can identify prefix array problems if the problem requires you to:

  • Answering queries about a specific range of the array.

Leetcode Problem Set

# Solution
548Split Array with Equal Sum
Total Solved: 1