-
Notifications
You must be signed in to change notification settings - Fork 126
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
[Flynn] week 11 #548
[Flynn] week 11 #548
Conversation
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.
친절한 설명과 깔끔한 코드에 항상 감탄합니다.
한주 고생하셨습니다!
reorder-list/flynn.go
Outdated
curr1, curr2 := head, prev | ||
for curr2.Next != nil { | ||
tmp := curr1.Next | ||
curr1.Next = curr2 | ||
curr1 = tmp | ||
tmp = curr2.Next | ||
curr2.Next = curr1 | ||
curr2 = tmp | ||
} |
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.
for curr1, curr2 := head, prev; curr2 != nil && curr2.Next != nil; { tmp1, tmp2 := curr1.Next, curr2.Next curr1.Next, curr2.Next = curr2, tmp1 curr1, curr2 = tmp1, tmp2 }
별 차이는 없지만 마지막 부분 이렇게 바꿀수도 있지 않을까 싶어서 남겨봅니다 :)
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.
감사합니다 훨씬 가독성이 좋네요 :)
바로 반영할게요
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.