beginnerData Structures & Algorithms~50 min
Prefix Sums & Kadane
Master the toolkit behind fast range-sum queries and streaming analytics. You will build a prefix-sum class for O(1) range queries, count subarrays with a target sum, apply batched range updates with a difference array, find the maximum subarray with Kadane's algorithm, and locate a pivot index. These patterns power dashboards, time-series rollups, and interview favorites.