// TOPIC

#recursion

9 articles

Beginner
01

Recursion: Thinking in Smaller Selves

Recursion explained from first principles — base case, recursive case, the call stack, and why your function sometimes blows up. The mental model every programmer needs before touching trees, graphs, or dynamic programming.

#recursion#fundamentals#call-stack
9 min
◆◆Intermediate
02

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.

#dynamic-programming#recursion#memoization
10 min
◆◆IntermediateAmazonMeta
03

Binary Trees and Traversals

Master binary tree traversal — inorder, preorder, postorder, and level-order — and the recursive mindset that makes dozens of tree problems click instantly.

#trees#binary-trees#traversals
11 min
◆◆IntermediateAmazonGoogle
04

Binary Search Trees

The left<node<right invariant gives you O(log n) search, insert, and delete — until the tree degenerates into a linked list. Here's the full picture, including why inorder traversal is a free sort.

#trees#data-structures#binary-search
11 min
◆◆IntermediateMetaAmazon
05

Subsets, Permutations & Combinations

Generate every subset, permutation, and combination with the choose/explore/un-choose backtracking template. Understand the 2^n and n! complexity ceilings, why sorting kills duplicate branches, and how to recognize which variant a problem is actually asking for.

#backtracking#recursion#combinatorics
12 min
◆◆IntermediateGoogleAmazon
06

Divide & Conquer

Split a problem into smaller subproblems, solve them independently, combine the results. This one mental model gives you merge sort, quickselect, the count-inversions trick, and Kadane's origin story — plus the intuition for why n log n is the price of sorting.

#divide-and-conquer#sorting#recursion
12 min
◆◆IntermediateAmazonGoogle
07

DFS Patterns

Depth-first search is the backbone of cycle detection, flood fill, path enumeration, and clone graph — master the visited-set template, the 3-color trick, and when to reach for DFS over BFS.

#graphs#dfs#traversal
13 min
◆◆◆AdvancedGoogleAmazon
08

Dynamic Programming: The Real Guide

Dynamic programming isn't about memorizing patterns — it's a four-step framework for turning exponential recursion into linear solutions. Master the mental model once and every DP problem opens up.

#dynamic-programming#recursion#memoization
12 min
◆◆IntermediateGoogleMeta
09

Backtracking

Learn the backtracking algorithm pattern — the systematic brute force that prunes itself. Master the universal choose-explore-unchoose template and apply it to subsets, permutations, combination sum, and N-queens.

#backtracking#recursion#combinatorics
10 min