[seongmin36] WEEK 02 Solutions#2690
Open
seongmin36 wants to merge 10 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🏷️ 알고리즘 패턴 분석
- 패턴: Dynamic Programming
- 설명: 2단계 점화식으로 이전 값들 이용해 현재 값을 구하는 DP 패턴으로, 클라이밍 스테어의 경우 피보나치-like 시퀀스를 배열에 저장하며 해법을 계산합니다.
📊 시간/공간 복잡도 분석
ℹ️ 이 파일에는 3가지 풀이가 포함되어 있어 각각 분석합니다.
풀이 1: climbStairs — Time: O(n) / Space: O(n)
| 복잡도 | |
|---|---|
| Time | O(n) |
| Space | O(n) |
피드백: 배열을 사용해 연속된 두 값의 합으로 계단 수를 계산한다.
개선 제안: 현재 구현이 적절해 보입니다.
풀이 2: productExceptSelf — Time: O(n) / Space: O(1)
| 복잡도 | |
|---|---|
| Time | O(n) |
| Space | O(1) |
피드백: 왼쪽과 오른쪽 누적 곱을 이용해 한 번의 순회로 결과를 얻는다.
개선 제안: 현재 구현이 적절해 보입니다.
풀이 3: isAnagram — Time: O(n) / Space: O(n)
| 복잡도 | |
|---|---|
| Time | O(n) |
| Space | O(n) |
피드백: 길이 검사 후 맵을 통해 각 문자 카운트를 증가/감소시키는 방식이다.
개선 제안: 현재 구현이 적절해 보입니다.
💡 풀이에 시간/공간 복잡도를 주석으로 남겨보세요!
Contributor
📊 seongmin36 님의 학습 현황이번 주 제출 문제
누적 학습 요약
문제 풀이 현황
🤖 이 댓글은 GitHub App을 통해 자동으로 작성되었습니다. 🔢 API 사용량 (gpt-5-nano)
|
Contributor
There was a problem hiding this comment.
🏷️ 알고리즘 패턴 분석
- 패턴: Two Pointers
- 설명: 배열에서 두 포인터를 앞뒤로 움직이며 각 위치의 곱을 누적하는 방식으로, 이중 반복 없이 각 원소를 제외한 곱을 구한다. left와 right 두 포인터로 좌우를 관리하는 구조가 핵심이다.
Contributor
There was a problem hiding this comment.
🏷️ 알고리즘 패턴 분석
- 패턴: Hash Map / Hash Set, Two Pointers
- 설명: 두 문자열의 문자 빈도를 해시 맵으로 카운트하고, 두 문자열를 비교하며 차감을 통해 같은지 확인하는 방식이다. 순회를 통해 각 문자 등장 횟수를 추적하므로 해시 맵 패턴이 적합하며, 변수를 하나씩 줄여가는 연산은 투 포인터 느낌도 준다.
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 하나 이상을 반드시 검토를 해주셔야 합니다!