Data structures and algorithms are among the most valuable concepts to learn in computer science. This boot camp organizes my notes into a structured learning path.
About this guide
I’m writing this from a student’s perspective, not an expert’s. I’ll be learning alongside you and solidifying my own knowledge as I go.
Feel free to correct me, make suggestions, and ask questions on Twitter. This guide is a living document.
Why learn algorithms?
Sometimes you’ll face complex problems at work that require deep knowledge of data structures and algorithms.
Without understanding algorithms, you might:
- Write code that runs extremely inefficiently
- Build something that works for small inputs but breaks on large ones
- Attempt to implement something that’s not theoretically possible to do efficiently
Companies also ask algorithm questions in technical interviews. Even if you don’t use them daily, you should know them for interviewing.
Who is this for?
- Programmers who want to get better at algorithms
- Experienced developers looking to solidify their knowledge
- Anyone interested in learning how to take structured notes on code
Roadmap
Phase 1: Foundations
Intro to Algorithms, Sorting, and Time Complexity
- What is an algorithm?
- Data structures 101
- Sorting and bubble sort
- A posteriori vs a priori analysis
- Big O notation
- Worst, average, and best case analysis
- Recurrence relations
- Arithmetic series
- Bubble sort analysis
TypeScript Overview
- TypeScript intro
- Intermediate TypeScript
- Test-driven development
- Design patterns
Recursion
Fundamentals
- Recursion 101
- Base case
- Inductive step
- Recursive case
Examples
- Recursive exponent
- Fibonacci numbers
- Is palindrome
- Pascal’s triangle
Backtracking
- Valid parenthesis
- N-Queens problem
Limitations
- Call stack
- Tail recursion
Divide and Conquer
- Merge sort
Linked Lists
Linked List 101
- TypeScript implementation
Operations
- Insert
- Delete
- Find
Problems
- Reverse a linked list
- Merge two sorted linked lists
Complete topic reference
This is a comprehensive list of all topics covered in the boot camp.
Arrays
Concepts: 2D arrays, n-dimensional arrays, jagged arrays
Problems: Two sum, search index, kth largest element
Linked lists
Operations: Insert, delete, find, reverse, counting, finding middle, merging, kth to last, detecting cycles
Stacks and queues
Stack: Towers of Hanoi
Queue: LIFO, FIFO
Trees
Concepts: Root, edge, leaf, depth
Binary trees: Binary search trees, level order traversal, construct tree from traversal
Balanced trees: AVL tree, B-tree
Operations: Insertion, deletion, traversal (pre-order, in-order, post-order), search (BFS, DFS), find min/max, find successor/predecessor
Hash tables
Implementations: Array, linked list, binary tree
Operations: Get, put, delete
Concepts: Hash function, linear probing, quadratic probing, collision resolution
Problems: LRU cache
Heaps
Priority queue: Compare function, enqueue, dequeue, peek
Concepts: Complete binary tree, array representation, min heap, max heap
Operations: Build, insert, get, delete, heapify, heap sort in place
Problems: Merge k sorted lists, kth largest element, the skyline problem
Tries
Compressed trie, suffix trie
Advanced data structures
Skip list, suffix tree, suffix array, bloom filter
Sorting
Bubble sort, insertion sort, merge sort, quick sort, radix sort, counting sort, sort stability
Problems: Dutch national flag, merge two sorted arrays
Graphs
Concepts: Graph theory, pathfinding, connectivity, shortest path, minimum spanning tree, cycles, disjoint graph
Traversal: BFS, DFS, bipartite graph, topological sort
Algorithms: Dijkstra’s, Bellman-Ford, Floyd-Warshall, Prim’s, Kruskal’s
Representations: Adjacency list, adjacency matrix
Recursion
Concepts: Backtracking, base case, recursive case, inductive step, tail recursion, memoization
Problems: Factorial, exponent, subsets, Fibonacci, Pascal’s triangle, Towers of Hanoi, binary strings, letter case permutations, permutations, subset sum, generate parenthesis, N-Queens, subarray sum equals k, valid parenthesis
String algorithms
Concepts: String matching, pattern matching, string search, data compression, edit distance, substring search, string similarity
Algorithms: Rabin-Karp, KMP (Knuth-Morris-Pratt)
Problems: Non-repeating characters, anagram, palindrome, frequency counting, reverse
Dynamic programming
Problems: 0/1 knapsack, longest common subsequence, subset sum, minimum edit distance, minimum coins, longest increasing subsequence, longest palindromic subsequence, text justification
Network flow
Maximum flow, minimum cut, Ford-Fulkerson, Edmonds-Karp, Dinic’s algorithm, König’s theorem
NP-complete problems
Approximation methods: Simulated annealing, tabu search, genetic algorithms, ant colony optimization, particle swarm optimization
Classic problems: Set cover, knapsack, bin packing, vertex cover, Hamiltonian path, traveling salesman, satisfiability, partition, clique, chromatic number
Search algorithms
Linear search, binary search, DFS, BFS, best-first search, A* search, Dijkstra’s, Bellman-Ford, Floyd-Warshall, Johnson’s algorithm
Algorithm design
Greedy algorithms, dynamic programming, divide and conquer, decrease and conquer, transform and conquer, randomized algorithms
Algorithm analysis
Time complexity: Big-O, Omega, Theta, little-o notation
Series: Arithmetic, harmonic, arithmetic-geometric
Space complexity