LeetCode topics — Array
Questions
Basic
Interval
Counter
Sort
Matrix
Solutions
Basic
Two PointersSliding WindowSliding WindowTwo PointersCount TrendingsTwo Pointers with GeneratorTwo PointersTwo Pointers with GreedySliding Window with GreedySliding Window with GreedyGreedyPrune and SearchCount ElementsCount ElementsBinary SearchReverseIndex as Hash KeyIndex as Hash KeyIndex as Hash KeyIndex as Hash KeyAd hocKadane’s AlgorithmRolling SumSort and Three Pointers, O(MlogM + NlogN)/O(1)HashSet, O(M + N)/O(M + N)Sort and Three Pointers, O(MlogM + NlogN)/O(1)HashMap, O(M + N)/O(M + N)Sort, O(NlogN)/O(1)Counting Sort, O(N)/O(N)Binary SearchHashMap and Two PointersTwo PointersSort, O(NlogN)/O(1)HashSet, O(N)/O(N)Sliding WindowSliding Window on BucketsGreedy with Two PointersGreedy with Two PointersKadane’s AlgorithmGreedyKadane’s Algorithm on TransactionsDynamic Programming on TransactionsGreedy or Kadane’s Algorithm on TransactionsGreedy or Dynamic Programming on TransactionsDynamic Programming on TransactionsDynamic Programming on TransactionsTwo PointersTwo PointersTwo PointersSort and Kadane’s Algorithm, O(NlogN)/O(1)HashSet, O(N)/O(N)Detect Cycle with Two PointersSort and Sweep LineSweep LineInterval
GreedyGreedyGreedySort, O(NlogN)Sweep Line, O(N + M)SortSort, O(NlogN)/O(1)Time Sweep, O(N + (M - m))/O(M - m)Sort and HeapSort on All PointsBinary SearchHeapBinary SearchBinary SearchQueueGreedyQueueCounter
Counter, O(N)/O(N)Sort and Two Pointer, O(sort)/O(sort)Count occurrence of each number of all subarraysMonodeque and Sliding WindowDequeQuick Select AlgorithmQuick Select AlgorithmCounting SortBucketsBucketsHeapKadane’s AlgorithmSign Variant of Kadane’s AlgorithmMin Variant of Kadane’s AlgorithmHashMapsliding windowHashMapSliding WindowDynamic Programming on Two DirectionsKadane’s Algorithm on Max Ending and Min EndingKadane’s Algorithm on Prefix and SuffixIndex as Hash KeyTwo PointersGreedyCounting SortTwo Scans, O(N²)/O(1)Binary Indexed Tree, O(NlogN)/O(N)Binary Indexed TreeSort
Three PointersThree Way PartitioningTwo PointersBucketsBinary Indexed TreeMerge SortGreedyAd hocQuick Select Median and Three Way Partitioning on Virtual IndexingMatrix
GreedyReverse and TransposeRotate Four RectanglesSimulationSimulationSimulationSimulationKadane’s Algorithm on Four Directions, O(mn)/O(n)Kadane’s Algorithm on Four Directions, O(4mn)/O(1)SimulationSimulationHashSetCount Delta of Each 1sBinary SearchPrune and SearchBacktrackingMedians of Two CoordinatesCount StreaksBFSBinary Search on Two CoordinatesHashSetBacktrackingGet Block Sum by 2D Prefix MatrixScan Increasing Squares by 2D Prefix MatrixDynamic Programming on Largest Rectangle Histogram with SortDynamic Programming on Two Directions