---
id: bfs
title: "Breadth First Search (BFS)"
author: Benjamin Qi
prerequisites:
- Silver - Depth First Search
description: "Traversing a graph in a way such that vertices closer to the starting vertex are processed first."
frequency: 2
---
import { Problem } from "../models";
export const metadata = {
problems: {
sample: [
new Problem("CSES", "Message Route", "1667", "Easy", false, ["BFS"]),
],
general: [
new Problem("CSES", "Monsters", "1194", "Easy", false, ["BFS"]),
new Problem("Gold", "Cow Navigation", "695", "Easy", false, ["BFS"], "lots of casework"),
new Problem("CSA", "BFS-DFS", "bfs-dfs", "Normal", false, ["BFS", "DFS"]),
new Problem("Gold", "Lasers", "671", "Normal", false, ["BFS"]),
new Problem("Gold", "Dream", "575", "Hard", false, ["BFS"]),
],
}
};
No silver problem should require BFS rather than DFS, but it's still good to know at this level.
## Sample
## Resources
interactive
## Problems