AtlassianSoftware Engineer · OnsiteCodemia practiceBFS on graph
Given an undirected graph represented as an adjacency list, implement a Breadth-First Search (BFS) algorithm to traverse the graph starting from a specified source node. Your function should return a list of nodes in the order they are visited. The input will consist of the graph and the starting node, and the output should be the traversal order as an array of node values.
Medium
Coding & Algorithms