Graph Traversal using BFS/DFS
Asked at PayPal · Coding Questions · Difficulty: Easy · Last asked Jul 15, 2026
Please implement a Python function to solve a graph traversal problem using BFS or DFS algorithms. Given an undirected graph consisting of nodes and edges, in adjacency list format, and a starting node, return a list of all reachable nodes using either BFS or DFS. Do not use graph traversal functions from the standard library.
Loading the problem…