#fundamentals
15 articles
What Is a Data Structure?
A data structure is a deal you strike — you give up something to make one operation fast. Here is the big picture before you dive into any of them.
Big-O Notation, Demystified
Big-O notation is the one tool every engineer needs to reason about performance. Learn to read it, use it, and stop fearing it — with concrete op-counts that make the curves click.
Arrays and How Memory Really Works
Go under the hood of the most fundamental data structure — contiguous bytes, O(1) index addressing, cache lines, and why a sequential scan beats a random walk every time.
Recursion: Thinking in Smaller Selves
Recursion from first principles — base case, recursive case, and the call stack — the mental model you need before trees, graphs, and DP.
Sorting Algorithms, From Scratch
Build real sorting intuition — from the O(n²) trio to the O(n log n) workhorses: bubble, selection, insertion, merge, and quicksort.
Searching: Linear vs Binary
Binary search vs linear search explained from first principles — why halving a sorted list gives you O(log n), when it crushes linear search, and why hash tables beat both.
Hashing: The O(1) Superpower
How hash functions and buckets turn lookup into O(1) average time — the intuition behind collisions, chaining, and load factor that every engineer should own.
Stacks and Queues: Order Matters
Learn LIFO vs FIFO, how the call stack works, and when a stack or queue is exactly the right tool — the two simplest constrained collections in CS.
Trees: When Data Branches
Move beyond flat lists and discover why trees power everything from file systems to databases. Learn nodes, roots, leaves, height, and how a balanced tree buys you O(log n) on a silver platter.
Graphs: Everything Is Connected
Graphs model maps, social networks, and dependencies. Learn how nodes and edges work, how to represent them, and what BFS and DFS unlock.
Dynamic Programming for Beginners
Dynamic programming demystified — learn how overlapping subproblems and optimal substructure turn exponential brute-force recursion into clean O(n) solutions, starting from Fibonacci.
Choosing the Right Data Structure
The meta-skill every engineer needs — a decision framework that maps your dominant operation to the right structure, so you stop guessing and start choosing deliberately.
Strings
Strings are immutable arrays hiding an O(n²) concatenation trap. Learn the sliding window, two-pointer, and hashing patterns that crack string interviews.
Stacks
The stack data structure explained from first principles — LIFO semantics, O(1) push and pop, and why it shows up everywhere from your call stack to balanced-parentheses checkers.
Arrays
The data structure everything else is built on. Why arr[i] is instant, why inserting in the middle hurts, and the handful of patterns that turn arrays into interview wins.