Breadth First Search with Depth Tracking
Breadth First Search with Depth Tracking: a task in Terminal-Lego-15k (Harbor dataset). Implement a breadth-first search (BFS) algorithm in Python that tracks and returns the depth (level) of each node as the algorithm traverses a tree/graph structure.
The task
Implement a breadth-first search (BFS) algorithm in Python that tracks and returns the depth (level) of each node as the algorithm traverses a tree/graph structure.
Part of PrimeIntellect/Terminal-Lego-15k.