DSA Fundamentals

32 lessons/ labs included

data structures and algorithms taught the right way - from first principles, with memory-first thinking. understand why things work, not just what to memorize. arrays, linked lists, trees, graphs, sorting, searching - all with real-world motivation and hands-on implementation.

what you'll learn

  • Memory-first thinking — understand how data structures actually live in RAM
  • Arrays, slices, and dynamic arrays — contiguous memory and cache performance
  • Linked lists, stacks, and queues — when indirection makes sense
  • Trees and binary search trees — traversals, balancing, and real-world use
  • Graphs — representation, BFS, DFS, and shortest paths
  • Sorting and searching — from bubble sort to quicksort, with complexity analysis

Foundations

Introduction

what are data structures and why do they matter? the relationship between data structures and algorithms, and how this course is structured.

Seek into the Memory

memory as a giant array of bytes, addresses, cache hierarchy, and why understanding memory is the key to writing fast code.

Arrays

Static Arrays

contiguous memory allocation, index-based access, and why O(1) access is possible. the foundation of all other data structures.

Dynamic Arrays

growing arrays on demand, amortized analysis, and why doubling beats incrementing. the implementation behind slices, vectors, and lists.

Linear Structures

Stacks

LIFO principle, the call stack, and why recursion works. from function calls to expression parsing.

Singly Linked Lists

non-contiguous storage, pointer surgery, and the cache locality tradeoff. plus: what Rust teaches us about ownership in linked lists.

Doubly Linked Lists

bidirectional traversal, LRU caches, and why doubly linked lists break Rust's ownership model.

Queues

FIFO principle, circular buffers, and the structure behind every job processing system.

Recursion

Factorial

understanding recursion through the simplest example. base cases, recursive cases, and tracing the call stack.

Fibonacci Sequence

when naive recursion explodes. branching recursion, memoization, and the gateway to dynamic programming.

Sorting

Insertion Sort

the card sorting algorithm. simple, in-place, and surprisingly useful for small or nearly-sorted data.

Merge Sort

divide and conquer. guaranteed O(n log n), stable sorting, and the algorithm of choice when consistency matters.

Quick Sort

partition around a pivot. cache-efficient, in-place, and why it's the default sort in most libraries despite O(n^2) worst case.

Bucket Sort

breaking the comparison lower bound. when you know your data's distribution, you can sort in linear time.

Binary Search

Search Array

the power of sorted data. divide and conquer search, O(log n) explained, and common implementation pitfalls.

Search Range

beyond exact matches. lower bound, upper bound, and the generalized binary search for finding boundaries.

Trees

Binary Tree

hierarchical data structures. tree terminology, memory representation, and what Rust teaches us about tree ownership.

Binary Search Tree

ordering in trees. the BST property, why it enables fast search, and how tree shape affects performance.

BST Insert and Remove

dynamic BST operations. inserting while maintaining order, and the three cases of deletion.

Depth-First Search

preorder, inorder, postorder. three ways to traverse a tree and when to use each.

Breadth-First Search

level-order traversal. using a queue to explore trees layer by layer and find shortest paths.

BST Sets and Maps

from trees to collections. implementing ordered sets and maps with BSTs, plus range queries.

Heaps

Heap Properties

complete binary trees with ordering. the heap property, array representation, and why heaps are perfect for priority queues.

Push and Pop

heap operations. bubble up, bubble down, and maintaining the heap invariant in O(log n).

Heapify

building heaps efficiently. why bottom-up heapify is O(n), not O(n log n), and its use in heap sort.

Hashing

Hash Usage

the O(1) dream. hash tables and sets, when to use them, and solving problems with constant-time lookup.

Hash Implementation

under the hood. hash functions, collision handling with chaining and open addressing, and load factors.

Graphs

Intro to Graphs

vertices and edges. directed vs undirected, representations, and what Rust's ownership model teaches about graph structure.

Matrix DFS

graphs in disguise. DFS on 2D grids for flood fill, island counting, and connected components.

Matrix BFS

shortest paths on grids. level-by-level exploration, multi-source BFS, and distance transforms.

Adjacency List

the standard graph representation. building graphs efficiently, iterating neighbors, and DFS/BFS on general graphs.

Bit Manipulation

Bit Operations

the lowest level. AND, OR, XOR, shifts, and the bit tricks that power permissions, sets, and low-level code.