jump game, like bfs