Unity Interview Question

Breadth first search algorithm, similar to leetcode