Nice BFS problem O(1?)