Use DFS relaize BFS