Graph Traversal Algorithms
Fundamental algorithms for navigating graphs.
Fundamental algorithms for navigating graphs.
Algorithms for exploring and searching graphs: breadth-first and depth-first search, Dijkstra, Bellman-Ford, A* and Floyd-Warshall, with bidirectional search, iterative deepening, uniform-cost and greedy best-first search, topological sorting and Johnson's all-pairs algorithm.
| Name | Type | Description |
|---|---|---|
| Breadth-First Search | Traversal | Explore all neighbors at current depth before deeper vertices. |
| Depth-First Search | Traversal | Explore as far as possible along each branch before backtracking. |
| Dijkstra | Shortest Path | Greedy shortest path from a source with non-negative edges. |
| Bellman-Ford | Shortest Path | Handles negative edge weights and detects negative cycles. |
| A* Search | Heuristic Search | Uses a heuristic to guide pathfinding efficiently. |
| Floyd-Warshall | All-Pairs Shortest Path | Dynamic programming shortest paths between every pair of vertices. |
| Uniform-Cost Search | Shortest path | Expands the lowest-cost path first; equivalent to Dijkstra's algorithm on a graph. |
| Iterative Deepening DFS | Traversal | Repeats depth-limited DFS with increasing limits, combining DFS memory use with BFS completeness. |
| Bidirectional Search | Shortest path | Searches forward from the start and backward from the goal, meeting in the middle. |
| Greedy Best-First Search | Informed search | Expands the node that looks closest to the goal by a heuristic; fast but not guaranteed optimal. |
| Topological Sort | Ordering | Orders the nodes of a directed acyclic graph so every edge points forward. |
| Johnson's Algorithm | All-pairs shortest path | Reweights edges with Bellman-Ford, then runs Dijkstra from every node; efficient for sparse graphs. |
The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.
| Section | Field | Type | Example |
|---|---|---|---|
| data | name | string | Breadth-First Search |
| data | type | string | Traversal |
| data | description | string | Explore all neighbors at current depth before d… |
The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.
curl "https://yjtoon.com/api/dataset/graph-traversal-algorithms?format=toon"
const res = await fetch( "https://yjtoon.com/static-data/dataset/graph-traversal-algorithms.toon" ); const toon = await res.text();
Rate limit: 120 requests per minute per IP, no key and no signup. API reference →