Posts tagged

Bfs

Graph Algorithms You Must Know for FAANG Interviews

A complete topic hub for graph algorithms in coding interviews. Covers what graphs are and how to represent them (adjacency list vs. matrix), when to choose BFS vs. DFS with full Python implementations, the shortest-path ladder from plain BFS through Dijkstra, Bellman-Ford, and Floyd-Warshall, and the five interview patterns that account for most graph questions: connected components and island counting, cycle detection, topological sort with Kahn's algorithm, grid-as-graph BFS, and union-find. Includes a curated problem list ordered from easy to hard, complexity tables, and links to the day-by-day graph lessons in the 60-day curriculum.