Data structures and algorithms are how engineers think about problems: choose a representation, design a procedure, prove it correct, and predict its cost. This roadmap teaches that thinking in Go, from a first loop invariant to production structures such as LRU caches and concurrent maps, with small examples in every lesson and larger runnable demos in the code viewer.
go run file.go (Go 1.23 or newer), and complete each lesson's Practice Lab before moving on.
| # | DSA | Topic | Description |
|---|---|---|---|
| PHASE 1: FOUNDATIONS | |||
| 01 | Thinking in Algorithms | Specify, work examples, brute force first, loop invariants, and table-driven tests. | |
| 02 | Complexity Analysis | Big O, Omega, Theta, reading cost from code, amortized cost, and doubling experiments. | |
| 03 | Recursion & the Call Stack | Base case and reduction, stack frames, recurrences, and converting recursion to loops. | |
| 04 | Data Structures Map | Go arrays, slices, maps, stdlib containers, a cost catalog, and choosing a structure. | |
| PHASE 2: CORE DATA STRUCTURES | |||
| 05 | Arrays & Slices | Slice internals, two pointers, sliding window, and prefix sums. | |
| 06 | Linked Lists | Singly and doubly linked lists, sentinel nodes, reversal, and cycle detection. | |
| 07 | Stacks & Queues | Stacks, queues, ring buffers, deques, and monotonic stacks. | |
| 08 | Hash Tables | Hash functions, collisions, a map from scratch, and counting patterns. | |
| 09 | Binary Trees & BST | Traversals, recursive tree thinking, and binary search tree operations. | |
| 10 | Heaps & Priority Queues | Binary heaps, container/heap, top-k, and k-way merge. | |
| PHASE 3: CORE ALGORITHMS | |||
| 11 | Searching | Linear and binary search, lower/upper bounds, and binary search on the answer. | |
| 12 | Sorting | Elementary sorts, merge sort, quicksort, counting and radix sort, stability. | |
| 13 | Graph Traversal | Representations, BFS, DFS, topological sort, and union-find. | |
| 14 | Shortest Paths & MST | Dijkstra, Bellman-Ford, A*, and Kruskal/Prim spanning trees. | |
| PHASE 4: ADVANCED ALGORITHMS | |||
| 15 | Greedy Algorithms | Local choices, exchange arguments, intervals, and Huffman coding. | |
| 16 | Dynamic Programming | Memoization, tabulation, state design, and classic DP problems. | |
| 17 | Backtracking | Subsets, permutations, N-Queens, constraint search, and pruning. | |
| 18 | Advanced Trees | Balanced trees, tries, segment trees, and Fenwick trees. | |
| 19 | String Algorithms | KMP, rolling hash, tries in practice, and suffix arrays. | |
| 20 | Advanced Techniques | Bit manipulation, randomized algorithms, Bloom filters, and HyperLogLog. | |
| 21 | Production Structures | LRU cache, rate limiter, consistent hashing, and concurrent structures in Go. | |
| PHASE 5: PRACTICE & REFERENCE | |||
| 22 | Demo Examples | Runnable, commented Go programs for every phase, in the code viewer. | |
| 23 | Study Projects | Open-source Go projects to read and contribute to: algorithm collections, caches, storage engines, and more. | |
| 24 | References | Go documentation and playgrounds, visualizers, free and classic books, practice sites, and key papers. | |
This tutorial was realized with Claude Code: Sonnet 5.5.