From 9ea135f2b228a17d60d977aaddc38fb60e98c2ef Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Fri, 15 Aug 2025 23:21:43 +0900 Subject: [PATCH] 20250815 baekjoon --- code_study/Baekjoon/java/_10026.java | 56 ++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 code_study/Baekjoon/java/_10026.java diff --git a/code_study/Baekjoon/java/_10026.java b/code_study/Baekjoon/java/_10026.java new file mode 100644 index 0000000..308be43 --- /dev/null +++ b/code_study/Baekjoon/java/_10026.java @@ -0,0 +1,56 @@ +import java.util.*; + +public class _10026 { + + public static int countAreaBFS(String[] grid, int N){ + int[] dx = {1,-1,0,0}; + int[] dy = {0,0,1,-1}; + Deque qx = new ArrayDeque<>(); + Deque qy = new ArrayDeque<>(); + boolean[][] visited = new boolean[N][N]; + int countArea = 0; + + for(int i=0; i