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

[전현수] - 최소 스패닝 트리, 경쟁적 전염, Coins, 카드 섞기 #258

Merged
merged 4 commits into from
May 13, 2024

Conversation

soopeach
Copy link
Member

📌 from issue #256 📌

📋문제 목록📋

최소 스패닝 트리: ✅
경쟁적 전염: ✅
Coins: ⛔️
카드 섞기: ✅

📍추가로 해결한 문제📍

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

📝메모

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


@soopeach soopeach requested review from bngsh, jeeminimini and jhg3410 May 12, 2024 02:17
@soopeach soopeach self-assigned this May 12, 2024

val (curPos, curNum, curTime) = queue.poll()

if (time <= curTime) break
Copy link
Contributor

Choose a reason for hiding this comment

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

continue말고 바로 break해도 되는거였네요,,


while (true) {

if (cnt != 0 && init.contentEquals(cur)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

또 고차함수 하나 배워갑니다👍


while (queue.isNotEmpty()) {

val (curPos, curNum, curTime) = queue.poll()
Copy link
Member

Choose a reason for hiding this comment

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

curTimequeue 의 원소에 넣으면, 잠시 저장할 tmp 같은 변수가 필요가 없군요!!👍

queue.add(it)
}

while (queue.isNotEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

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

bfs로 풀 수 있군요!! 👍

@soopeach soopeach merged commit e411ebe into main May 13, 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