Bfs Algorithm Using Python With Javascript