Challenge: Implement Breadth-First Search
Explore how to implement breadth-first search in a directed graph using adjacency lists. This lesson guides you to return traversal order starting from a given vertex, helping you understand graph algorithms and prepare for coding interviews.
We'll cover the following...
We'll cover the following...
Statement
Given a directed graph represented as an adjacency list, graph, and an integer, source, which is the starting vertex number, return an array of integers, result, that contains the order of the graph’s breadth-first traversal starting from the source vertex.
Constraints:
...