[JAVA] DFS Flood fill 구현
class Solution { @Test public void solution() { // 5, 5 영역 int[][] board = new int[][] { {0,0,0,0,0}, {0,0,0,1,1}, {0,0,0,1,0}, {1,1,1,1,0}, {0,0,0,0,0} }; DFS_Flood_Fill(board, 1, 1, 3); for(int i = 0; i < board.length; i++) { for(int j = 0; j < board[i].length; j++) { System.out.print(board[i][j] + " "); } System.out.println(""); } } /** * 다차원 배열의 특정 칸과 연결된 영역을 검색하는 알고리즘. * 그림판의 채우기와 같은 기능. * ..