Skip to content

Files

Latest commit

5b26503 · Jul 21, 2024

History

History
37 lines (28 loc) · 5.08 KB

prefix_sum.md

File metadata and controls

37 lines (28 loc) · 5.08 KB

Prefix Sum

Principe

Le principe de Prefix Sum consiste à calculer la somme cumulative des éléments d'un tableau, où chaque élément de sortie est la somme des éléments précédents jusqu'à une position donnée dans le tableau d'entrée. En d'autres termes, vous ajoutez progressivement les éléments du tableau depuis le début jusqu'à une position donnée pour obtenir la somme cumulée jusqu'à cette position. Cela permet d'accélérer les calculs de sommes partielles lorsqu'on doit les répéter plusieurs fois.

Facile

Label Tags Date
303. Range Sum Query - Immutable Array, Design, Prefix Sum 26-02-2024
724. Find Pivot Index Array, Prefix Sum 26-02-2024
1413. Minimum Value to Get Positive Step by Step Sum Array, Prefix Sum 27-02-2024
1422. Maximum Score After Splitting a String String, Prefix Sum 27-02-2024
1480. Running Sum of 1d Array Array, Prefix Sum 27-02-2024
1588. Sum of All Odd Length Subarrays Array, Prefix Sum, Math 27-02-2024
1732. Find the Highest Altitude Array, Prefix Sum 28-02-2024
1854. Maximum Population Year Array, Prefix Sum, Counting 26-02-2024
1893. Check if All the Integers in a Range Are Covered Array, Prefix Sum, Hash Table 26-02-2024
1991. Find the Middle Index in Array Array, Prefix Sum 26-02-2024
2485. Find the Pivot Integer Prefix Sum, Math 13-03-2024
2574. Left and Right Sum Differences Array, Prefix Sum 21-05-2024
3028. Ant on the Boundary Array, Prefix Sum, Simulation 26-02-2024

Moyen

Label Tags Date
238. Product of Array Except Self Array, Prefix Sum 22-02-2024
3096. Minimum Levels to Gain More Points Array, Prefix Sum 30-05-2024

Difficile

Label Tags Date