Meta Interview Question

The question was simple one related to BFS