깊이 우선 탐색1 DFS: 깊이 우선 탐색- iteration, recursion Chapter 7 DFS DFS - Depth first search function dfsRecursion(adjacencyList: Array, here: number, visited: boolean[]) { visited[here] = true; const currentEdges = adjacencyList[here]; for (let i = 0; i < currentEdges.length; i++) { const connectedVertex = currentEdges[i]; if (visited[connectedVertex] === true) continue; dfsRecursion(adjacencyList, connectedVertex, visited); } } function dfsIterat.. 2023. 1. 15. 이전 1 다음