Skip to content

[essaysir] WEEK 02 Solutions#2681

Open
essaysir wants to merge 2 commits into
DaleStudy:mainfrom
essaysir:week-02
Open

[essaysir] WEEK 02 Solutions#2681
essaysir wants to merge 2 commits into
DaleStudy:mainfrom
essaysir:week-02

Conversation

@essaysir

@essaysir essaysir commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

@dalestudy

dalestudy Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

📊 essaysir 님의 학습 현황

이번 주 제출 문제

문제 난이도 유형 분석
climbing-stairs Easy ⚠️ 유형 불일치
valid-anagram Easy ✅ 의도한 유형

누적 학습 요약

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

문제 풀이 현황

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

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

🔢 API 사용량 (gpt-5-nano)
요청 입력 토큰 출력 토큰 합계 비용
1 754 116 870 $0.000084

@github-actions github-actions Bot added the java label Jun 29, 2026

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.

🏷️ 알고리즘 패턴 분석

  • 패턴: Dynamic Programming, Greedy, Divide and Conquer
  • 설명: 피보나치 형태의 부분 문제를 합쳐서 해를 구하는 구조이며, 중복 하향식 서브문제를 분해하는 Divide and Conquer의 특징을 보인다. 하지만 비효율적인 재귀 그대로라 직접적 DP 최적화는 보이지 않으며, 문제 의도는 DP/분할 정복 패턴에 근접하다.

📊 시간/공간 복잡도 분석

유저 분석 실제 분석 결과
Time O(2의 N승) O(2^n)
Space O(N) O(n)

피드백: 중복된 부분문제를 재사용하지 않아 지수 시간 복잡도가 발생한다.

개선 제안: 고려해볼 만한 대안: 메모이제이션 또는 비재귀 DP로 시간 복잡도를 O(n)으로 개선하라.

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.

제 생각에 dfs 함수에 적절한 cache만 추가해도 시간복잡도가 엄청나게 좋아질것 같네요 ( O(N) )!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

한 번 그렇게 수정해보도록 하겠습니다!! 감사합니다!!

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.

🏷️ 알고리즘 패턴 분석

  • 패턴: Hash Map / Hash Set
  • 설명: 두 문자열의 문자 등장 빈도를 맵으로 세고, 두 맵의 동일성으로 아나그램 여부를 판단한다. 각 문자별 개수 비교를 통해 동등성을 확인하는 패턴이다.

📊 시간/공간 복잡도 분석

복잡도
Time O(n + m)
Space O(

피드백: 두 개의 맵을 사용해 문자의 빈도를 세고, 최종적으로 맵이 동일한지 비교한다.

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

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

@Yiseull Yiseull self-requested a review June 29, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Solving

Development

Successfully merging this pull request may close these issues.

3 participants