// TOPIC

#dfs

7 articles

Beginner
01

Graphs: Everything Is Connected

The graph data structure models the real world — maps, social networks, dependencies — better than any other. Learn how nodes and edges work, how to represent them, and how BFS and DFS let you actually do something useful with them.

#graphs#data-structures#bfs
10 min
◆◆IntermediateGoogleMeta
02

Graphs

The data structure that models everything connected — social networks, road maps, dependency chains, and more. Master representations, traversals, and the "model it as a graph" reframe that unlocks whole categories of problems.

#graphs#data-structures#bfs
11 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
◆◆IntermediateGoogleAmazon
04

Topological Sort

Order the nodes of a DAG so every edge points forward — the algorithm that drives build systems, package managers, course schedulers, and anything else that lives and dies by dependency ordering.

#graphs#dag#topological-sort
13 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
◆◆IntermediateAmazonGoogle
06

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
◆◆IntermediateGoogleMeta
07

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