Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
이웃한 칸 class Solution { public int solution(String[][] board, int h, int w) { int answer = 0; String color = board[h][w]; int[] dx = {-1, 1, 0, 0}, dy = {0, 0, -1, 1}; for(int i = 0; i < 4; i++){ int nx = w + dx[i]; int ny = h + dy[i]; if(nx < 0 || nx >= board[0].length || ny < 0 || ny >= board.length) continue; if(board[ny][nx].equals(color)) answer++; } return answer; } }
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.