문제풀이[dfs/bfs] - DFS와 BFS, 미로탐색
백준 1260번 - DFS와 BFS DFS와 BFS를 구현하는 문제였다. DFS는 재귀함수 버전과 Stack을 사용하는 버전으로 구현하고, BFS는 Queue를 사용하였다. package codingTestPractice.baekjoon; import java.util.*; public class sol1260 { public static void dfs(List graph, int v, boolean[] visited){ visited[v]=true; System.out.print(v+" "); for(int i:graph.get(v)){ if(visited[i]==false) dfs(graph, i, visited); } } public static void dfs2(List graph, int v,..