Skip to content

[freemjstudio] WEEK 08 Solutions - #2806

Open
freemjstudio wants to merge 1 commit into
DaleStudy:mainfrom
freemjstudio:freemjstdudio-week08
Open

[freemjstudio] WEEK 08 Solutions#2806
freemjstudio wants to merge 1 commit into
DaleStudy:mainfrom
freemjstudio:freemjstdudio-week08

Conversation

@freemjstudio

Copy link
Copy Markdown
Contributor

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

@dalestudy

dalestudy Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ Week 설정이 누락되었습니다

프로젝트에서 Week를 설정해주세요!

설정 방법

  1. PR 우측의 Projects 섹션에서 리트코드 스터디 옆 드롭다운(▼) 클릭
  2. 현재 주차를 선택해주세요 (예: Week 14(current) 또는 Week 14)

📚 자세한 가이드 보기


🤖 이 댓글은 GitHub App을 통해 자동으로 작성되었습니다.

@dalestudy

dalestudy Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

📊 freemjstudio 님의 학습 현황

이번 주 제출 문제

문제 난이도 유형 분석
reverse-linked-list Easy ✅ 의도한 유형

누적 학습 요약

  • 풀이한 문제: 17 / 75개
  • 이번 주 유형 일치율: 100% (1문제 중 1문제 일치)

문제 풀이 현황

카테고리 진행도 완료
Array ■■■■□□□ 5 / 10 (Easy 3, Medium 2)
Heap ■■□□□□□ 1 / 3 (Medium 1)
String ■■□□□□□ 3 / 10 (Medium 1, Easy 2)
Dynamic Programming ■■□□□□□ 3 / 11 (Medium 3)
Matrix ■■□□□□□ 1 / 4 (Medium 1)
Binary ■□□□□□□ 1 / 5 (Easy 1)
Linked List ■□□□□□□ 1 / 6 (Easy 1)
Tree ■□□□□□□ 2 / 14 (Medium 1, Easy 1)
Graph □□□□□□□ 0 / 8 ← 아직 시작 안 함
Interval □□□□□□□ 0 / 5 ← 아직 시작 안 함

🤖 이 댓글은 GitHub App을 통해 자동으로 작성되었습니다.

🔢 API 사용량 (gpt-5-nano)
요청 입력 토큰 출력 토큰 합계 비용
1 312 37 349 $0.000030

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🏷️ 알고리즘 패턴 분석

reverse-linked-list/freemjstudio.py
# Definition for singly-linked list.
# class ListNode:
#     def __init__(self, val=0, next=None):
#         self.val = val
#         self.next = next
class Solution:
    def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]:
        prev= None
        current = head

        while current:
            next_node = current.next
            current.next = prev

            prev = current
            current = next_node

        return prev
  • 패턴: Two Pointers, Linked List
  • 설명: 리스트를 역순으로 뒤집는 문제로, 포인터를 서로 교차시키며 앞뒤 연결을 바꿔나가는 전형적인 Two Pointers 패턴에 해당합니다. 순회와 포인터 갱신을 통해 한 방향으로 진행합니다.

📊 시간/공간 복잡도 분석

복잡도
Time O(n)
Space O(1)

피드백: 현재 구현은 루프를 한 번 순회하며 각 노드의 next 포인터를 이전 노드로 바꿔 반전합니다.

개선 제안: 현재 구현이 적절해 보입니다.

💡 풀이에 시간/공간 복잡도를 주석으로 남겨보세요!

@parkhojeong parkhojeong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

수고하셨습니다

@parkhojeong parkhojeong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

주차 설정, pr 제목 등 pr 체크리스트 항목들 확인 부탁드립니다.

@DaleSeo
DaleSeo self-requested a review August 8, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants