🔢
Arrays
From scans and prefix sums to Kadane and in-place rewrites.
01
Scans & aggregates
0/16 of 21Single-pass sums, running totals, min/max.
○Running Sum of a 1D ArraySilver · 1000○Running Sum of 1d ArraySilver · 1000○Concatenation of ArraySilver · 1000○Final Value After OperationsSilver · 1040○Maximum Ascending Subarray SumSilver · 1050○Sum of Unique ElementsSilver · 1050○Find the Highest AltitudeSilver · 1050○Kids With the Greatest Number of CandiesSilver · 1050○Build Array from PermutationSilver · 1050○Running Sum Of ArraySilver · 1050○Richest Customer WealthSilver · 1080○Number of Good PairsSilver · 1100○Kids With the Greatest CandiesSilver · 1100○Count Good PairsSilver · 1120○Decompress Run-Length Encoded ListSilver · 1150○Final Value of Variable After OperationsGold · 1300+ 5 more in the arena →
02
Prefix & product
0/15Prefix sums, product-except-self, range tricks.
○Sum of Absolute DifferencesSilver · 1100○Running Prefix SumSilver · 1150○Find Pivot IndexSilver · 1150○Count Pairs With Absolute Difference KSilver · 1150○Range Sum Query (Offline)Silver · 1200○Maximum Difference Between Increasing ElementsSilver · 1200○Max DifferenceSilver · 1200○Count Number of Pairs With Absolute Difference KGold · 1300○Left And Right Sum DifferenceGold · 1300○Find the Difference of Two ArraysGold · 1350○Find the Distinct Difference ArrayGold · 1350○Contiguous Array Equal Zeros and OnesGold · 1450○Minimum Value to Get Positive Step by Step SumGold · 1480○Subarray Sums Divisible by 7Gold · 1500○Product Except SelfGold · 1550
03
Kadane & subarrays
0/16 of 28Maximum subarray, circular variants, windows.
○Longest Subarray Sum At Most KSilver · 1100○Longest Subarray of 1's After Deleting OneSilver · 1150○Shortest Unsorted Continuous SubarrayGold · 1350○Longest Turbulent SubarrayGold · 1350○Sum of All Odd Length SubarraysGold · 1350○Maximum Average SubarrayGold · 1350○Degree of an ArrayGold · 1400○Maximum Erasure ValueGold · 1400○Max Sum of Two Non-Overlapping SubarraysGold · 1400○Max Consecutive Ones IIIGold · 1450○Number of Arithmetic SubarraysGold · 1450○Longest Subarray of Ones After One DeletionGold · 1450○Longest Subarray With Two DistinctGold · 1450○Maximum Subarray SumGold · 1500○Subarray Product Less Than KGold · 1500○Maximum Sum Circular SubarrayGold · 1500+ 12 more in the arena →
04
Two-pass & in-place
0/13Rewrite arrays in place; rotate, move, sort colors.
○Rotate Array Right by KSilver · 1050○Sort Colors (Dutch Flag)Silver · 1100○Rotate Array Left by KSilver · 1150○Remove Duplicates from Sorted ArraySilver · 1150○Move ZeroesSilver · 1150○Rotate ArraySilver · 1150○Find Minimum in Rotated Sorted ArraySilver · 1180○Move Zeroes to EndSilver · 1200○Remove Duplicates Allow TwiceGold · 1300○Rotate By OneGold · 1350○Merge Sorted Arrays In PlaceGold · 1400○Merge Sorted Array In PlaceGold · 1450○Next PermutationGold · 1500
05
Counting & lookups
0/16 of 17Duplicates, majority, single number, intersections.
○Find All Numbers DisappearedSilver · 1100○Set MismatchSilver · 1150○Kth Missing Positive NumberSilver · 1150○Intersection of Multiple ArraysSilver · 1200○Third Maximum NumberGold · 1300○Find the Missing NumberGold · 1350○Find the Duplicate and Missing PairGold · 1350○Intersection Of Two Sorted ArraysGold · 1350○Find Disappeared NumbersGold · 1350○Third MaximumGold · 1400○Majority Elements Over n/3Gold · 1450○Find All Disappeared NumbersGold · 1450○Common Elements SortedGold · 1500○Find Disappeared Numbers (Sorted)Gold · 1500○First Missing PositivePlatinum · 1700○Find Missing ObservationsPlatinum · 1750+ 1 more in the arena →
06
Search & two pointers
0/8Rotated search, peaks, 3-sum, water.