using System;using System.Collections.Generic;public class DFSExample { static void DFS(List[] graph, int node, bool[] visited) { //인접 리스트, node 번호, visited 여부 if (visited[node]) return; // 이미 방문한 노드면 종료 Console.WriteLine("Visiting node: " + node); visited[node] = true; // 방문 처리 foreach (var neighbor in graph[node]) { DFS(graph, neighbor, visited); // 재귀..