This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/5_Gold/BFS.mdx
2020-07-14 14:38:28 -04:00

48 lines
1.7 KiB
Text

---
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"]),
],
}
};
<problems-list problems={metadata.problems.sample} />
## Resources
<resources>
<resource source="CSA" title="Breadth First Search" url="breadth_first_search" starred>interactive</resource>
<resource source="CPH" title="12.2 - Breadth-First Search" starred></resource>
<resource source="PAPS" title="12.1 - Breadth-First Search"></resource>
<resource source="KA" title="Breadth First Search and Its Uses" url="https://www.khanacademy.org/computing/computer-science/algorithms/breadth-first-search/a/breadth-first-search-and-its-uses"></resource>
<resource source="cp-algo" title="Breadth First Search" url="graph/breadth-first-search.html"></resource>
<resource source="cp-algo" title="0/1 BFS" url="graph/01_bfs.html"></resource>
<resource source="IUSACO" title="10.4 - Graph Traversal Algorithms"></resource>
</resources>
## Implementation
<IncompleteSection />
## Problems
<problems-list problems={metadata.problems.general} />