-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
|
||
val (curPos, curNum, curTime) = queue.poll() | ||
|
||
if (time <= curTime) break |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curTime
을 queue
의 원소에 넣으면, 잠시 저장할 tmp 같은 변수가 필요가 없군요!!👍
queue.add(it) | ||
} | ||
|
||
while (queue.isNotEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bfs로 풀 수 있군요!! 👍
📌 from issue #256 📌
📋문제 목록📋
📍추가로 해결한 문제📍
📝메모
공유하고 싶은 정보, 새롭게 알게된 것, 문제를 풀면서 발생한 에로사항 등...자유롭게!