Practice · judged on hidden tests
Problems
100 problems, ordered so each topic builds on the last.
- Not startedMerging many sorted lists at onceSorting, Arrays, HeapsHard
- Not startedMirror the treeTreesEasy
- Not startedMost frequent numbersHash maps, Sorting, ArraysMedium
- Not startedMove the zeroes to the endArrays, Two pointersEasy
- Not startedProduct of everything elsePrefix sums, ArraysMedium
- Not startedRaising to a power without multiplying that many timesBasics, NumbersMedium
- Not startedReading a tree one level at a timeTrees, Stacks and queuesMedium
- Not startedReads the same backwardsBasics, NumbersEasy
- Not startedRead the grid in a spiralArrays, MatricesMedium
- Not startedRunning sumPrefix sums, ArraysEasy
- Not startedSearch insert positionBinary search, ArraysEasy
- Not startedSharing the books so nobody reads too muchBinary search, ArraysMedium
- Not startedShortest stretch that reaches the targetArrays, Sliding windowMedium
- Not startedSorting 0s, 1s and 2s in one passSorting, Arrays, 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 neighboursDynamic programming, ArraysMedium
- Not startedThe biggest rectangle inside a histogramArrays, Stacks and queuesHard
- Not startedThe cheapest way down through the gridDynamic programming, Arrays, MatricesMedium
- Not startedThe deepest node both of them are underTreesMedium
- Not startedThe first letter that has appeared only once, so farHash maps, Stacks and queues, StringsMedium
- Not startedThe first negative number in every windowArrays, Stacks and queues, Sliding windowMedium
- Not startedThe kth largest, without sorting everythingArrays, HeapsMedium
- Not startedThe kth smallest value in a search treeBinary search, TreesMedium
- Not startedThe largest number in every windowArrays, Stacks and queues, Sliding windowHard