알고리즘/연습문제

import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int[][] arr; static boolean visited[][]; static int[] dx = {-1, 0, 1, 0}; static int[] dy = {0, -1, 0, 1}; static int N; static int M; static class Point { int x; int y; Point(int x, int y) { this.x = x; this.y = y; } } public static void bfs(int x, int y) { Queue q = new LinkedList(); q.add..
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int[][] graph; static boolean visited[]; static int N; static int M; static int start; public static void dfs(int i) { visited[i] = true; System.out.print(i + " "); for (int j = 1; j
iron_jin
'알고리즘/연습문제' 카테고리의 글 목록 (8 Page)