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

[전현수] - 알고스팟, A와 B 2, 입국심사, 회장뽑기 #186

Merged
merged 4 commits into from
Oct 8, 2023

Conversation

soopeach
Copy link
Member

@soopeach soopeach commented Oct 8, 2023

📌 from issue #185 📌

📋문제 목록📋

알고스팟: ✅
A와 B 2: ⛔️
입국심사: ⛔️
회장뽑기: ✅

📍추가로 해결한 문제📍

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

📝메모

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


@soopeach soopeach self-assigned this Oct 8, 2023
@soopeach soopeach added the 현수 label Oct 8, 2023
find(s, t.substring(0, t.lastIndex))
}
if (t.first() == 'B') {
find(s, t.substring(1, t.lastIndex + 1).reversed())
Copy link
Contributor

Choose a reason for hiding this comment

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

재귀함수 깔끔하게 구성하셨네요👍

private data class Position(val x: Int, val y: Int)

private data class Bundle(val pos: Position, val cost: Int) {
constructor(x: Int, y: Int, cost: Int) : this(Position(x, y), cost)
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 +70 to +76
private fun Queue<Pair<Int, Int>>.addAll(
pairElement: Pair<MutableList<Int>, Int>,
) {
pairElement.first.forEach {
this.add(it to pairElement.second)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

코틀린 활용을 참 잘하시네용 👍
전 다 까묵게 생겼어요...

Comment on lines +38 to +41
val visited = BooleanArray(peopleCnt + 1).apply {
this[0] = true
this[myIndex] = true
}
Copy link
Member

Choose a reason for hiding this comment

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

오 깔끔해요

Comment on lines +70 to +76
private fun Queue<Pair<Int, Int>>.addAll(
pairElement: Pair<MutableList<Int>, Int>,
) {
pairElement.first.forEach {
this.add(it to pairElement.second)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

친구관계 넣는 걸 깔끔하게 함수로 빼신 게 좋슴다!

@soopeach soopeach merged commit 3f8b9de into main Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants