Breadth First Search Algorithm Leetcode Problems Javascript W3schools