← Amazon questions
CodingEasy

Implement BFS

Filed under Amazon

Given the root node of a directed or undirected graph, implement Breadth-First Search (BFS) to traverse all reachable nodes level by level and return them in the order visited.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.