🧮
DSA Foundations
Core data structures and algorithms — from Big-O to hashing, two-pointers, and sorting.
Curriculum · 371 lessons
01The Stack Abstract Data Typeintro4m02Linear Search Basicsintro3m03The Sliding Window Patternintro4m04The Singly Linked Listintro4m05The Brute Force Baselineintro4m06Naive String Matchingintro4m07Representing Intervalsintro4m08One Dimensional Linear DPintro4m09Big-O, intuitivelyintro5m10Binary Searchintro4m11Matrix Traversalintro4m12Adjacency List versus Matrixintro4m13Difference Arraysintro4m14The Cross Product and Orientation Testintro4m15Space Complexity Analysisintro4m16The Sieve of Eratosthenesintro4m17The Backtracking Templateintro4m18The Two Pointer Techniqueintro4m19The Dynamic Array Growthintro4m20Points and Vectors Basicsintro4m21Fisher Yates Shuffleintro4m22AVL Tree Rotationsintro4m23Bubble And Insertion Sort Intuitionintro4m24Max Flow and Min Cutintro4m25Best, Average, and Worst Caseintro4m26Two Pointersintro4m27Flood Fillintro3m28Modular Exponentiationintro4m29String Hashing for Substring Comparisonintro4m30The Two Pointers Patternintro4m31The Dynamic Array and Amortized Resizingintro5m32Prime Factorizationintro4m33Graph Representation Tradeoffsintro4m34KMP Pattern Matching Deepintro5m35Dijkstra with Decrease Keyintro5m36Polygon Area with the Shoelace Formulaintro4m37The Prefix Function Intuitionintro5m38Generating Subsetsintro3m39Merging Overlapping Intervalsintro4m40Hash maps: the O(1) superpowerintro4m41Recursion and the Call Stackintro4m42Fast and Slow Pointersintro4m43Breadth First Search on Graphsintro4m44Boyer Moore Majority Voteintro4m45Iterative versus Recursive Tradeoffsintro4m46The Greatest Common Divisor by Euclidintro4m47Breadth First Search Applicationsintro4m48Opposite Ends Pointersintro4m49Heuristics and Local Searchintro4m50The Z Algorithmintro4m51Cross Product Orientationintro4m52Two Dimensional Grid DPintro4m53The B Tree And B Plus Treeintro5m54Prefix Sumsintro3m55The Doubly Linked Listintro4m56Binary Search On A Sorted Arrayintro4m57The Interval Scheduling Greedyintro4m58The Modular Inverseintro4m59A Star Search Heuristicintro5m60Ternary Search for Unimodal Functionsintro4m61Ternary Search on Real Functionsintro4m62The Greedy Choice Propertyintro5m63Depth First Search Applicationsintro4m64Generating Permutationsintro4m65The Fast and Slow Pointersintro4m66NP Completeness Introintro5m67Boyer Moore Heuristicsintro5m68Polygon Area Shoelaceintro4m69Las Vegas Versus Monte Carlointro4m70DP Space Optimization with Rolling Arraysintro4m71Red Black Tree Rules Deepintro5m72The Failure Links Ideaintro5m73Fermat's Little Theoremintro4m74Bidirectional Searchintro4m75Depth First Search on Graphscore4m76Interval Scheduling Maximizationcore4m77Kadane Maximum Subarraycore4m78Finding Connected Componentscore4m79Checking if a Graph is Bipartitecore4m80The Merge Intervals Patterncore5m81Stable versus Unstable Sortingcore4m82Modular Arithmetic Basicscore4m83Generating Combinationscore4m84The Merge Two Sorted With Pointerscore4m85The Subset Sum Patterncore4m86Topological Sort DFScore5m87The Monotonic Dequecore5m88Point in Polygon Testcore5m89In Place Reversal of a Linked Listcore5m90Tail Recursion and Stack Depthcore5m91The Queue Abstract Data Typecore4m92The Trie for Prefix Searchcore5m93Counting Sort For Small Rangescore4m94The Rat In A Mazecore4m95The Sliding Window Fixed Sizecore4m96The Difference Array for Rangescore4m97SPFA Shortest Pathcore5m98Coin Changecore4m99The State Space Treecore4m100The Stack With Arraycore4m101The Deque Operationscore4m102Kahn Algorithm Deepcore5m103The Treapcore4m104Interval Schedulingcore4m105Square Root Decompositioncore5m106Line Segment Intersectioncore5m107The Cyclic Sort Patterncore5m108The Divide and Conquer Paradigmcore5m109The Optimal Substructure Propertycore5m110Palindrome Detection with Expansioncore5m111Cycle Detection In Undirected Graphscore4m112Exponential Searchcore4m113The Combination Sumcore4m114The Prefix Sum Techniquecore4m115The Eulerian Pathcore4m116The Trie Compression Radixcore5m117The Unbounded Knapsackcore4m118Bellman Ford Negative Cyclecore6m119Sliding Windowcore5m120Longest Common Subsequencecore5m121Multi Source BFScore4m122The Sliding Window Techniquecore5m123The Sparse Table for Range Queriescore5m124The Convex Hull with Graham Scancore5m125The Subsets Patterncore5m126Amortized Analysis Basicscore5m127The Dequecore4m128Overlapping Subproblemscore5m129Rolling Hash for Matchingcore6m130The Extended Euclidean Algorithmcore5m131The Lower And Upper Boundcore4m132The Word Search Gridcore4m133The Sliding Window Variable Sizecore5m134The Sweep Line Techniquecore5m135Bipartite Matchingcore5m136Streaming Mediancore5m137The Zero One Knapsackcore5m138The Splay Treecore4m139Depth First Searchcore4m140The Rolling Hashcore5m141Comparison versus Non Comparison Sortscore5m142Fast Exponentiationcore4m143Floyd Warshall Deepcore6m144Breadth First Searchcore5m145The Knapsack Problemcore5m146Detecting Cycles in Directed Graphscore5m147Randomized Quickselectcore5m148The Z Functioncore5m149The Top K Elements Patterncore5m150Greedy versus Dynamic Programmingcore5m151Memoization versus Tabulationcore5m152Cycle Detection In Directed Graphscore4m153Palindrome Partitioningcore4m154The Partition By Pivotcore5m155The Queue With Circular Buffercore5m156The Hash Table Chainingcore5m157The Trie Structurecore4m158The Meeting Rooms Problemcore5m159Convex Hull Andrew Monotonecore5m160Skip List Randomizationcore5m161Modular Combinatoricscore5m162The Segment Tree Buildcore5m163Exchange Argument Proofscore5m164The Topological Sort Patterncore5m165The Recursion Tree Methodcore5m166The Longest Common Subsequence Recurrencecore6m167Binomial Coefficient Computationcore5m168Merge Sort And Its Recurrencecore5m169The Kadane Running Sumcore5m170Range Sum With a BITcore4m171The Euler Totient Functioncore5m172Kruskal with Union Find Deepcore6m173Monotonic Stackcore5m174Word Ladder Shortest Transformationcore5m175The Two Heaps Pattern for Medianscore5m176The Segment Treecore6m177The KMP Failure Functioncore5m178The Master Theoremcore6m179The Hash Table with Chainingcore5m180The Decrease and Conquer Ideacore5m181Double Hashing to Avoid Collisionscore5m182Combinatorics Counting Principlescore5m183Topological Sort With Kahncore5m184The N Queens Problemcore5m185The Shrinking Window Conditioncore5m186The Segment Tree Introcore5m187The Ford Fulkerson Methodcore5m188Suffix Array Constructioncore6m189Convex Hull Graham Scancore6m190Misra Gries Heavy Hitterscore5m191DP with a State Machinecore5m192Johnson All Pairscore6m193The Fenwick Tree Deepcore5m194Merge Sortcore4m195The K Way Merge Patterncore5m196Bit Counting Trickscore4m197Heap Sort With A Heapcore5m198Edit Distance Variantscore6m199Gaussian Eliminationcore5m200Prim with Heap Deepcore6m201The Line Sweep Techniquecore5m202The Euler Tour Techniquecore5m203The Activity Selection Greedy Proofcore5m204The Binary Search Treecore5m205The Divide and Conquer Recurrencecore6m206The Edit Distance Recurrencecore6m207Minimum Spanning Tree With Primcore5m208The Difference Arraycore5m209The Fenwick Binary Indexed Treecore5m210Approximation Algorithmscore5m211Bloom Filter Deep Divecore6m212Dynamic Programming Introcore5m213Edit Distancecore5m214Bellman Ford and Negative Edgescore5m215Bitmask Dynamic Programmingcore5m216The Inclusion Exclusion Principlecore5m217Ternary Search On A Unimodal Functioncore4m218The Sudoku Solvercore5m219The Hash Table Open Addressingcore5m220The Binary Heap Operationscore5m221The Suffix Automaton Introcore6m222Voronoi Diagram Introcore5m223Longest Increasing Subsequencecore5m224Binary Indexed Tree Applicationscore5m225Lazy Propagationcore6m226Modified Binary Search Patterncore6m227The Hash Table with Open Addressingcore5m228Transform and Conquercore5m229Dijkstra With A Heapcore5m230The Segment Tree Range Querycore5m231The Hungarian Algorithm Ideacore5m232MinHash Similaritycore5m233Matrix Exponentiationcore5m234The Lowest Common Ancestor Binary Liftingcore5m235Quicksortcore5m236Lowest Common Ancestor with Binary Liftingcore5m237Amortized Analysis with the Accounting Methodcore5m238The Wildcard Matching DPcore6m239The Catalan Numberscore5m240Interpolation Searchcore4m241DP on Treescore5m242Quickselectcore5m243Interval Dynamic Programmingcore5m244Two Satisfiabilitycore5m245The Two Heaps Patterncore5m246The Binary Heapcore5m247Randomization in Algorithmscore5m248Bellman Ford For Negative Edgescore5m249The Interval Treecore5m250Traveling Salesman Approachescore6m251Longest Common Substring With Suffixcore5m252Delaunay Triangulation Introcore5m253Count Min Sketch Deep Divecore6m254The Segment Tree Lazy Deepcore6m255Topological Sortcore5m256Maximum Flow with Edmonds Karpcore5m257Suffix Structures Overviewcore6m258Solving Linear Recurrencescore5m259Minimum Spanning Tree with Kruskalcore5m260Bipartite Matching with Hopcroft Karpcore5m261Closest Pair of Points Divide and Conquercore6m262The LRU Cache Structurecore5m263The Probabilistic Analysis Ideacore5m264Floyd Warshall All Pairscore5m265Manacher Palindromes Deepcore6m266KD Tree For Nearest Neighborcore6m267Interval DPcore5m268The Merge Sort Treecore5m269Tarjan Strongly Connected Componentscore5m270Digit Dynamic Programmingcore6m271The Balanced AVL Treecore5m272Locality Sensitive Hashingcore6m273The Miller Rabin Primality Testcore5m274Bounding Volume Hierarchycore6m275The Number Theoretic Transformcore6m276The DFS Templateadvanced5m277The BFS Templateadvanced5m278Floyd Cycle Detectionadvanced5m279Reservoir Samplingadvanced5m280The Bitset Optimizationadvanced5m281Quickselect For The Kth Elementadvanced5m282Integer Overflow Handlingadvanced5m283The Min Cut Max Flow Theoremadvanced5m284The Voronoi Diagram Ideaadvanced5m285Backtracking Templateadvanced6m286The Pigeonhole Principle in Algorithmsadvanced5m287The Longest Common Prefix Arrayadvanced6m288The Gray Code Constructionadvanced5m289Wildcard And Regex Matching DPadvanced6m290Minimum Spanning Treeadvanced6m291Zero One BFS with a Dequeadvanced5m292The Balanced Tree AVLadvanced5m293Union Findadvanced5m294Modular Inverseadvanced5m295Persistent Data Structuresadvanced6m296The Rotating Calipers Techniqueadvanced6m297The Loop Invariant Proofadvanced6m298The Fibonacci Matrix Formadvanced5m299Bipartite Check By Coloringadvanced4m300Quicksort Partition Schemesadvanced5m301The Cycle Detection Floydadvanced6m302The Longest Repeated Substringadvanced5m303Rabin Karp Rolling Hashadvanced5m304The Meet in the Middle Techniqueadvanced5m305The Line Sweep with a Balanced Treeadvanced6m306The Hungarian Algorithm for Assignmentadvanced5m307The Delaunay Triangulation Ideaadvanced5m308The Difference Between P and NPadvanced6m309The Red Black Tree Ideaadvanced6m310Sequence Alignmentadvanced7m311The Knight Touradvanced5m312The Dutch National Flagadvanced6m313The String Hashing Collisionsadvanced5m314Rotating Calipersadvanced6m315HyperLogLog Deep Diveadvanced7m316Kosaraju SCCadvanced6m317The Persistent Segment Treeadvanced6m318Backtrackingadvanced5m319A Star Searchadvanced6m320The Convex Hull Ideaadvanced5m321Mo's Algorithm for Offline Queriesadvanced6m322The Exchange Argumentadvanced6m323Union Find With Path Compressionadvanced5m324The Red Black Tree Intuitionadvanced5m325The Union Find Structureadvanced5m326Lucas' Theoremadvanced5m327Johnson Algorithm for All Pairsadvanced6m328Binary Search on the Answeradvanced6m329KMP String Matchingadvanced6m330The Chinese Remainder Theoremadvanced6m331The Suffix Arrayadvanced6m332Sweep Line for Segment Intersectionadvanced6m333Dynamic Programming State Designadvanced6m334Reductions Between Problemsadvanced6m335The Disjoint Set Forestadvanced6m336The Adversary Argument for Lower Boundsadvanced6m337The Manacher Algorithm Ideaadvanced7m338Radix Sort Digit By Digitadvanced5m339Pruning The Search Spaceadvanced5m340The Monotonic Deque Windowadvanced6m341The Sparse Table for RMQadvanced6m342The Tarjan Algorithmadvanced6m343Closest Pair Of Pointsadvanced7m344Online Competitive Ratioadvanced6m345Bitmask DPadvanced6m346Tarjan SCC Deepadvanced7m347The Centroid Decompositionadvanced6m348Centroid Decompositionadvanced6m349Pollard Rho Factorizationadvanced6m350Dijkstra Shortest Pathadvanced6m351Fenwick Tree Basicsadvanced5m352The Aho Corasick Automatonadvanced6m353DSU on Tree Small to Largeadvanced5m354The Potential Method for Amortized Analysisadvanced6m355NP Completeness Intuitionadvanced6m356Line Sweep For Intersectionsadvanced7m357Randomized Roundingadvanced6m358Digit DPadvanced6m359The Heavy Light Decompositionadvanced6m360Matrix Exponentiation for Recurrencesadvanced6m361Articulation Points and Bridgesadvanced5m362Memoized Backtrackingadvanced5m363Line Sweep for Rectanglesadvanced6m364The Fast Fourier Transform Ideaadvanced6m365Segment Tree Basicsadvanced6m366Strongly Connected Componentsadvanced6m367The Heavy Light Decomposition Ideaadvanced6m368The Suffix Tree Ideaadvanced5m369Hamiltonian Path Hardnessadvanced5m3702 SAT with SCCadvanced7m371DP Optimization with the Convex Hull Trickadvanced6m
Practice · 683 problems
⚔️Sum of an Array1000⚔️Reverse a String1000⚔️Contains Duplicate1000⚔️Count Segments in a String1000⚔️Jewels and Stones1000⚔️Running Sum of a 1D Array1000⚔️Color of a Chessboard Square1000⚔️To Lower Case1000⚔️Contains A, B, And C1000⚔️Running Sum of 1d Array1000⚔️Count Elements Equal to Maximum1000⚔️Reverse String Array1000⚔️Final Value of Variable After Performing Operations1000⚔️Concatenation of Array1000⚔️Remove All Spaces1000⚔️Count Zeros1000⚔️Reverse String1000⚔️Count the Vowels1000⚔️Count Words Equal to Target1000⚔️Bubble Sort1000⚔️Count Uppercase Letters1040⚔️Final Value After Operations1040⚔️Min and Max1050⚔️Reverse an Array1050
+ 659 more in the arena