Practice · judged on hidden tests
Problems
54 problems, ordered so each topic builds on the last.
- Not startedRunning sumArrays, Prefix sumsEasy
- Not startedSearch insert positionArrays, Binary searchEasy
- Not startedSharing the books so nobody reads too muchArrays, Binary searchMedium
- Not startedShortest stretch that reaches the targetArrays, Sliding windowMedium
- Not startedSorting 0s, 1s and 2s in one passArrays, Sorting, Two pointersMedium
- Not startedSqueeze out the duplicatesArrays, Two pointersEasy
- Not startedThe best k days in a rowArrays, Sliding windowEasy
- Not startedThe best you can take without touching neighboursArrays, Dynamic programmingMedium
- Not startedThe biggest rectangle inside a histogramArrays, Stacks and queuesHard
- Not startedThe cheapest way down through the gridArrays, Matrices, Dynamic programmingMedium
- Not startedThe first negative number in every windowArrays, Sliding window, Stacks and queuesMedium
- Not startedThe kth largest, without sorting everythingArrays, HeapsMedium
- Not startedThe largest number in every windowArrays, Sliding window, Stacks and queuesHard
- Not startedThe longest run of ones, with k flipsArrays, Sliding windowMedium
- Not startedThe next bigger number to the rightArrays, Stacks and queuesEasy
- Not startedThe number more than halfArrays, Hash mapsEasy
- Not startedThe number that appears onceArrays, Bit manipulation, Hash mapsEasy
- Not startedThe one number that is not repeated three timesArrays, Bit manipulationMedium
- Not startedThe slowest speed that still finishes in timeArrays, Binary searchMedium
- Not startedThe smallest ship that still finishes in timeArrays, Binary searchMedium
- Not startedThe smallest value after a rotationArrays, Binary searchMedium
- Not startedThe widest, deepest containerArrays, Two pointers, GreedyMedium
- Not startedTurn the square a quarter turnArrays, MatricesMedium
- Not startedTwo baskets, one row of treesArrays, Sliding window, Hash mapsMedium
- Not startedTwo sumArrays, Hash mapsEasy