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

[전현수] - 치즈, 가장 긴 증가하는 부분 수열 4, 내리막 길, 삼각 달팽이 #268

Merged
merged 4 commits into from
May 26, 2024

Conversation

soopeach
Copy link
Member

@soopeach soopeach commented May 26, 2024

📌 from issue #266 📌

📋문제 목록📋

치즈: ✅
가장 긴 증가하는 부분 수열 4 : ✅
내리막 길: ⛔️
삼각 달팽이 : ✅

📍추가로 해결한 문제📍

추천: 👍  
비추천: 👎  
문제에 대한 간단한 코멘트를 남겨주셔도 좋을 것 같아요!

📝메모

공유하고 싶은 정보, 새롭게 알게된 것, 문제를 풀면서 발생한 에로사항 등...자유롭게!


@soopeach soopeach requested review from bngsh, jeeminimini and jhg3410 May 26, 2024 06:42
@soopeach soopeach self-assigned this May 26, 2024
Comment on lines +18 to +20
Position(1, 0),
Position(0, 1),
Position(-1, -1),
Copy link
Contributor

Choose a reason for hiding this comment

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

설명 듣고 나니 풀이가 참 좋았슴다 번거롭게 인덱스 계산 안해도 되구요

for (j in this.first().indices) {
val cur = this[i][j]
if (cur == 1) this[i][j] = 0
else if (cur == 2) this[i][j] = 3
Copy link
Contributor

Choose a reason for hiding this comment

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

치즈 녹이는 로직이 새로웠어요

Comment on lines +18 to +20
Position(1, 0),
Position(0, 1),
Position(-1, -1),
Copy link
Member

Choose a reason for hiding this comment

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

요렇게 3방향 정해놓고 푸는게 깔끔해보였습니다!!

ny !in board.first().indices
) return@forEach

if (0 < board[nx][ny]) board[nx][ny]--
Copy link
Member

Choose a reason for hiding this comment

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

이렇게 체크하는 것도 괜찮네요!!

ny !in board.first().indices
) return@forEach

if (0 < board[nx][ny]) board[nx][ny]--
Copy link
Member

Choose a reason for hiding this comment

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

3으로 쌓아두고 하나씩 빼는 방식도 좋네요!

@soopeach soopeach merged commit 3d4765e into main May 26, 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.

4 participants