Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[week-13] 19637, 17822 #88

Merged
merged 1 commit into from
Apr 24, 2024
Merged

[week-13] 19637, 17822 #88

merged 1 commit into from
Apr 24, 2024

Conversation

clean2001
Copy link
Contributor

Comment on lines +103 to +112
// 오른쪽을 확인
if(arr[i][j] == arr[i][(j+1)%M]) {
zero[i][j] = zero[i][(j+1)%M] = true;
zeroNum++;
}

// 다음 원판을 확인
if(i<N && arr[i][j] == arr[i+1][j]) {
zero[i][j] = zero[i+1][j] = true;
zeroNum++;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인접한 점들을 체크하는 것을 이렇게 두개의 if문으로 깔끔하게 정리하다니,,멋지네요🔥

return newArr;
}

static boolean[][] makeZero(int[][] arr) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저는 3개씩 조사하느라 코드가 깔끔하지 않아졌었는데,
2개씩 하니까 훨씬 좋네요 😊

@wonkyDD wonkyDD merged commit 6c81b77 into main Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[week-13] 19637, 17822
3 participants