Breadth First Search Algorithm Leetcode 75