Recursion의 응용 [Counting Cells in a Blob]
※ 문제 설명 private static int BACKGROUND_PIXEL = 0; private static int IMAGE_PIXEL = 1; private static int VISITED_IMAGE_PIXCEL = 2; private static int[][] grid ={ {1,0,0,0,0,0,0,1}, {0,1,1,0,0,1,0,0}, {1,1,0,0,1,0,1,0}, {0,0,0,0,0,1,0,0}, {0,1,0,1,0,1,0,0}, {0,1,0,1,0,1,0,0}, {1,0,0,0,1,0,0,1}, {0,1,1,0,0,1,1,1} }; public static void main(String[] args) { int x=0; int y=0; int blob =0; ArrayList c..
더보기