Repository navigation
Conversation
Contributor
|
🤖 AI 리뷰(알고리즘 패턴, 시간/공간 복잡도, 학습 현황) 결과는 Checks 탭에서 볼 수 있어요. |
parkhojeong
requested changes
Dec 5, 2026
parkhojeong
left a comment
Collaborator
There was a problem hiding this comment.
수고하셨습니다. ci 실패 확인 부탁드려요.
ehlung
self-requested a review
December 5, 2026 14:11
ehlung
approved these changes
Dec 5, 2026
ehlung
left a comment
Contributor
There was a problem hiding this comment.
저도 이번 주에 21번을 풀어서 이 문제 위주로 봤습니다. 저랑 같은 시작용 노드 방식인데 조건을 더 짧게 쓰셔서 배웠어요. 이번 주차도 고생하셨습니다!
| """ | ||
| https://leetcode.com/problems/merge-two-sorted-lists/description/ | ||
| 시간 복잡도 : O(n) |
Contributor
There was a problem hiding this comment.
n이 무엇인지 적어 두면 읽는 사람이 더 빨리 알 수 있을 것 같아요. 저는 list1 길이를 n, list2 길이를 m으로 두고 O(n + m)으로 적었는데, n을 두 리스트 노드 수의 합으로 정하셨다면 지금처럼 O(n)도 맞는 것 같습니다!
Contributor
Author
There was a problem hiding this comment.
n을 두 리스트의 전체 노드 수로 생각하고 작성했습니다! 말씀주신 것처럼 변수의 의미도 함께 적는 게 명확할 것 같네요. 감사합니다 :)
| dummy = ListNode(0) | ||
| tail = dummy | ||
|
|
||
| while list1 and list2: |
Contributor
There was a problem hiding this comment.
is not None 없이 while list1 and list2:로 쓰셨네요! 노드 객체는 val이 0이어도 참이고 None만 거짓이라 이렇게 써도 되는군요. 저는 is not None을 붙여서 조건이 길어졌는데, 이렇게 쓰는 게 더 간결한 것 같아요 👍🏻
parkhojeong
approved these changes
Dec 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
답안 제출 문제
작성자 체크 리스트
In Review로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!