Skip to content

Conversation

@radiantchoi
Copy link
Contributor

@radiantchoi radiantchoi commented Dec 3, 2025

답안 제출 문제

작성자 체크 리스트

  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

검토자 체크 리스트

Important

본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!

  • 바로 이전에 올라온 PR에 본인을 코드 리뷰어로 추가해주세요.
  • 본인이 검토해야하는 PR의 답안 코드에 피드백을 주세요.
  • 토요일 전까지 PR을 병합할 수 있도록 승인해주세요.

@casentino
Copy link
Contributor

한 주간 문제 푸시느라 고생많으셨어요! 주석 달아주셔서 어떤방식으로 접근했는지 알수 있어서 좋았어요! 고생하셨습니다!

head = head.next
list2 = list2.next

while list1:
Copy link
Contributor

Choose a reason for hiding this comment

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

while list1:
....
while list2:
..

이쪽 부분에서 다시 반복문을 도는 이유가 list1 이나 list2 둘중에
하나가 비어있을때를 고려하신걸까요?

만약 맞다면 list1 과 list2 둘중 하나만 리스트가 존재할때
이미 정렬되어있는 상태이기 떄문에 그대로 반환해도 될것같아 보여요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

네 정확히 그런 케이스입니다! 저도 리뷰를 하면서 알게 된 것인데, 반복문을 다시 돌 것이 아니라, 리스트1과 리스트2중 하나 이하만 남아 있을 것이 분명하므로 그대로 현재 답안 리스트의 next로 붙여도 되겠더라구요.

@radiantchoi radiantchoi merged commit d9e68ec into DaleStudy:main Dec 6, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Completed in 리트코드 스터디 6기 Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

2 participants