From cb4163a9fb4486abb385be44a7d5c15d46941b40 Mon Sep 17 00:00:00 2001 From: Amal Bijoy Date: Tue, 7 Apr 2026 12:04:27 +0530 Subject: [PATCH] Fix BFS distance notation typo in Day 13 notes --- Notes/Day-13-graphs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Notes/Day-13-graphs.md b/Notes/Day-13-graphs.md index e42d19d..28e8481 100644 --- a/Notes/Day-13-graphs.md +++ b/Notes/Day-13-graphs.md @@ -19,7 +19,7 @@ - Pros: **`O(V+E)`** memory and efficient to iterate neighbors - good for sparse graphs. - Cons: Checking existence of a specific edge may be slower than with a matrix. ## Breadth-First Search (BFS): -BFS traverses a graph level by level (breadth-first). It explores all vertices at distance kkk from the start before vertices at distance **`k+1`**. BFS uses a **queue** to manage the frontier of vertices to visit. +BFS traverses a graph level by level (breadth-first). It explores all vertices at distance **`k`** from the start before vertices at distance **`k+1`**. BFS uses a **queue** to manage the frontier of vertices to visit. ### When to use BFS: - Find the shortest path (fewest edges) in an unweighted graph. - Test connectivity (reachability) from a source.