AKUNA CAPITAL Interview Question

The problem was about Breadth First Search algorithm.