Hyro Interview Question

A question that requierd knowledge with BFS algorithm