Visual DSA
Complete learning map
Every major DSA topic,in the right learning order.
Use this curriculum as your map. Start with complexity and arrays, build reusable interview patterns, then progress into graphs, dynamic programming, and advanced range or string algorithms.
19
Modules
123
Lessons
3
Levels
A–Z
Coverage
Showing 123 of 123 lessons across 19 modules
01FoundationsFoundationComplexity & Problem SolvingLearn how to measure growth, reason about trade-offs, and turn a problem statement into an algorithm.6 lessons
1Big O, Ω, and Θ TheoryUpper, lower, and tight asymptotic bounds.2Best, average, and worst case TheoryHow the same algorithm behaves across different inputs.3Space complexity TheoryInput space, auxiliary space, and recursion stacks.4Amortized analysis TheoryAverage cost across a sequence of operations.5Recurrences & Master Theorem TheoryAnalyze divide-and-conquer algorithms.6Problem-solving workflow TheoryExamples, constraints, brute force, invariants, and optimization.
02FoundationsFoundationMath, Number Theory & BitsBuild the mathematical tools used by counting, hashing, modular arithmetic, and bitwise algorithms.6 lessons
1GCD & LCM TheoryEuclidean algorithm and divisibility.2Prime numbers & sieve TheoryPrimality testing and Sieve of Eratosthenes.3Modular arithmetic TheoryOverflow-safe arithmetic and cyclic values.4Combinatorics TheoryPermutations, combinations, and counting choices.5Bit operations TheorySet, clear, toggle, test, and count bits.6XOR patterns TheoryCancellation, missing values, and unique elements.
03Data StructuresFoundationArrays, Strings & MatricesMaster contiguous memory, indexing, in-place transformations, and multidimensional traversal.6 lessons1 visual
1Array memory model InteractiveContiguous storage, indexes, resizing, and shifting.2In-place manipulation TheoryReverse, rotate, partition, and remove values.3Subarrays vs subsequences TheoryContiguous ranges and order-preserving choices.4String fundamentals TheoryCharacters, immutability, building, and comparison.5Matrix traversal TheoryRows, columns, diagonals, spiral, and boundary walks.6Matrix transformation TheoryTranspose, rotate, and mark rows or columns.
04AlgorithmsFoundationSorting AlgorithmsCompare elementary, divide-and-conquer, heap-based, and non-comparison sorting families.8 lessons
1Bubble Sort TheoryAdjacent swaps and a growing sorted suffix.2Selection Sort TheorySelect the next minimum and grow a sorted prefix.3Insertion Sort TheoryInsert each value into an already sorted prefix.4Merge Sort TheoryDivide, recursively sort, and merge stable runs.5Quick Sort & Quickselect TheoryPartition around a pivot and recurse selectively.6Heap Sort TheoryBuild a heap and repeatedly extract the extreme.7Counting, Radix & Bucket Sort TheoryExploit key structure to avoid comparisons.8Stability & in-place trade-offs TheoryChoose a sort using more than runtime alone.
05Data StructuresFoundationHashing & Frequency MapsConvert keys into fast lookups and use counting to replace repeated scans.5 lessons
1Hash-table internals TheoryBuckets, hash functions, collisions, load factor, and resizing.2Sets & maps TheoryPresence checks, key-value lookup, and uniqueness.3Frequency counting TheoryHistograms for strings, arrays, and multisets.4Prefix sum + hash map TheoryTrack prior states to count subarrays.5Rolling hash TheoryIncrementally hash windows and substrings.
06PatternsFoundationTwo-Pointer PatternsCoordinate indexes to remove nested loops, compact data, or compare sequences.5 lessons
1Opposite-direction pointers TheoryNarrow a sorted search space from both ends.2Same-direction pointers TheoryRead/write indexes for in-place compaction.3Merge pointers TheoryWalk two sorted sequences in linear time.4Three-sum reduction TheoryFix one value, then solve a two-pointer subproblem.5Palindrome & partitioning TheoryCompare ends or maintain regions.
07PatternsIntermediateSliding WindowReuse work across overlapping contiguous ranges with fixed or changing boundaries.5 lessons
1Fixed-size window TheoryAdd the incoming value and remove the outgoing value.2Variable-size window TheoryExpand and shrink while maintaining a condition.3Frequency windows TheoryTrack characters or values inside the active range.4Monotonic deque window TheoryMaintain range minima or maxima in linear time.5When windows fail TheoryNegative values and non-monotonic constraints.
08PatternsIntermediatePrefix Sums & KadanePrecompute cumulative state for range queries and optimize contiguous subarray scores.5 lessons
11D prefix sums TheoryAnswer range sums with two cumulative values.22D prefix sums TheoryAnswer rectangular matrix queries.3Difference arrays TheoryApply many range updates efficiently.4Kadane’s algorithm TheoryChoose whether to extend or restart a subarray.5Prefix/suffix products TheoryCombine directional precomputation.
09AlgorithmsIntermediateBinary SearchSearch exact values, boundaries, rotated data, matrices, and monotonic answer spaces.6 lessons
1Exact target search TheoryDiscard half after comparing with the middle.2Lower & upper bound TheoryFind the first or last position satisfying a predicate.3Rotated sorted arrays TheoryIdentify the sorted half before eliminating.4Peak & mountain search TheoryUse slope direction as the monotonic clue.5Binary search on answer TheoryFind the first feasible or last valid candidate.6Matrix binary search TheoryMap flat indexes into rows and columns.
10Data StructuresFoundationLinked ListsReason about references, pointer rewiring, cycles, and in-place reversal.5 lessons
1Singly linked list TheoryNodes, head/tail references, traversal, insertion, and deletion.2Doubly & circular lists TheoryBidirectional and wrap-around links.3In-place reversal TheoryReverse links while preserving the remaining chain.4Fast & slow pointers TheoryMiddle node, cycles, and cycle entry.5Merge & reorder TheorySplit, interleave, merge, and partition lists.
11Data StructuresFoundationStacks, Queues & DequesUse constrained access order to model nested work, arrival order, and range extremes.6 lessons1 visual
1Stack InteractiveLIFO operations, call stacks, parsing, and undo.2Queue & circular queue TheoryFIFO processing, ring buffers, and scheduling.3Deque TheoryEfficient updates at both ends.4Monotonic stack TheoryNext greater/smaller and contribution ranges.5Monotonic queue TheorySliding extrema and constrained DP.6Stack/queue conversions TheoryImplement one access discipline with another.
12AlgorithmsIntermediateRecursion & BacktrackingModel self-similar work and explore decision trees with choose–explore–unchoose.6 lessons
1Recursion fundamentals TheoryBase cases, recursive contracts, and stack frames.2Divide and conquer TheorySplit independent subproblems and combine results.3Subsets & combinations TheoryBranch on choices while controlling duplicates.4Permutations TheoryTrack used choices or swap positions.5Constraint search TheoryN-Queens, Sudoku, word search, and pruning.6Memoized recursion TheoryCache repeated states before moving to tabulation.
13Data StructuresIntermediateTrees & Binary Search TreesTraverse hierarchical data, maintain recursive invariants, and answer ordered queries.7 lessons
1Binary-tree model TheoryNodes, edges, depth, height, leaves, and subtrees.2DFS traversals TheoryPreorder, inorder, and postorder recursive contracts.3Level-order BFS TheoryProcess tree nodes one depth at a time.4BST operations TheorySearch, insert, delete, predecessor, and successor.5Balanced BSTs TheoryAVL and red-black invariants keep logarithmic height.6Tree construction TheoryRebuild trees from traversal orders.7Path & ancestor patterns TheoryLCA, diameter, path sums, and subtree results.
14Data StructuresIntermediateHeaps & Priority QueuesMaintain quick access to an extreme value without keeping everything fully sorted.6 lessons
1Binary heap TheoryComplete-tree layout, heap property, and array indexes.2Heapify TheorySift values up or down and build a heap in linear time.3Top K TheoryKeep only the most relevant k values.4Two heaps TheoryBalance lower and upper halves for streaming medians.5K-way merge TheoryMerge multiple sorted sources with a frontier heap.6Scheduling TheorySelect the next job by priority or availability.
15Data StructuresIntermediateTries & IntervalsRepresent shared prefixes and reason about ranges, overlap, merging, and scheduling.6 lessons
1Trie / prefix tree TheoryCharacter edges, terminal markers, and prefix lookup.2Wildcard trie search TheoryBranch when a pattern can match multiple edges.3Merge intervals TheorySort ranges and maintain the current merged end.4Insert interval TheoryPreserve sorted non-overlapping ranges.5Meeting rooms TheoryCount simultaneous intervals with heaps or events.6Line sweep TheoryTurn interval boundaries into ordered events.
16AlgorithmsIntermediateGreedy AlgorithmsMake locally optimal choices when an exchange argument proves they lead to a global optimum.6 lessons
1Greedy-choice property TheoryKnow when a local decision is safe.2Exchange arguments TheoryProve an optimal solution can use the greedy choice.3Interval scheduling TheorySelect compatible events using ordered endpoints.4Jump & reachability TheoryTrack the farthest achievable frontier.5Resource assignment TheorySort demands and resources before matching.6Huffman coding TheoryMerge the two least frequent nodes repeatedly.
17AlgorithmsIntermediateGraphsModel networks and master traversal, connectivity, dependency, and path algorithms.10 lessons
1Graph representation TheoryAdjacency lists, matrices, edge lists, and direction.2Depth-first search TheoryExplore a branch fully; detect structure recursively.3Breadth-first search TheoryExplore layers and shortest unweighted paths.4Grid graphs TheoryTreat matrix cells and neighbor moves as a graph.5Cycle & bipartite detection TheoryUse colors, parents, or recursion state.6Topological sort TheoryOrder DAG nodes using indegrees or DFS finish times.7Union Find TheoryMaintain components with path compression and union by rank.8Minimum spanning tree TheoryKruskal and Prim for cheapest connectivity.9Shortest paths TheoryBFS, Dijkstra, Bellman-Ford, and Floyd-Warshall.10Strongly connected components TheoryKosaraju and Tarjan decompositions.
18AlgorithmsAdvancedDynamic ProgrammingDefine reusable states, transitions, base cases, and evaluation order for overlapping subproblems.10 lessons
1DP thinking TheoryState, transition, base case, answer, and computation order.21D DP TheoryFibonacci, climbing stairs, robber, and state compression.30/1 knapsack TheoryChoose each item at most once.4Unbounded knapsack TheoryReuse choices for coin change and related problems.5Grid DP TheoryPaths, costs, obstacles, and multidirectional transitions.6String DP TheoryLCS, edit distance, palindromes, and word breaks.7LIS family TheorySequence DP and patience-sorting optimization.8Interval DP TheorySolve ranges by selecting split points.9Tree & DAG DP TheoryCombine child states or process topological order.10Bitmask & digit DP TheoryEncode subsets or prefix constraints in state.
19AdvancedAdvancedAdvanced Algorithms & StructuresLearn specialized tools for string matching, range queries, geometry, and competitive programming.9 lessons
1KMP & prefix function TheoryReuse matched-prefix information after mismatch.2Rabin–Karp TheoryUse rolling hashes for substring matching.3Z algorithm TheoryMeasure prefix matches from every position.4Fenwick tree TheoryPrefix aggregates with logarithmic updates.5Segment tree TheoryGeneral range queries, point/range updates, and lazy propagation.6Sparse table TheoryStatic idempotent range queries.7Sweep line TheoryProcess geometric or interval events in coordinate order.8A* search TheoryGuide shortest-path exploration with an admissible heuristic.9Network flow TheoryResidual graphs, augmenting paths, and min-cut duality.