Leetcode Breadth First Search Algorithm Example