[Cyjin-jani] WEEK 11 Solutions#2599
Open
Cyjin-jani wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
🏷️ 알고리즘 패턴 분석
- 패턴: Hash Map / Hash Set, Math / Mathematical Pattern
- 설명: 첫 번째 방법은 Hash Set을 이용하여 존재 여부를 체크하는 방식으로 Hash Map/Set 패턴에 속하며, 두 번째 방법은 가우스 합 공식을 활용하여 수학적 계산으로 문제를 해결하는 패턴입니다.
📊 시간/공간 복잡도 분석
ℹ️ 이 파일에는 2가지 풀이가 포함되어 있어 각각 분석합니다.
풀이 1: missingNumber — Time: ✅ O(n) → O(n) / Space: ✅ O(n) → O(n)
| 유저 분석 | 실제 분석 | 결과 | |
|---|---|---|---|
| Time | O(n) | O(n) | ✅ |
| Space | O(n) | O(n) | ✅ |
피드백: 배열의 모든 원소를 Set에 저장하는 데 O(n) 공간이 필요하며, 이후 범위 내에서 존재 여부를 검사하는 과정도 O(n) 시간에 수행됩니다.
개선 제안: 현재 구현이 적절해 보입니다.
풀이 2: missingNumber_v2 — Time: O(n) / Space: ✅ O(1) → O(1)
| 유저 분석 | 실제 분석 | 결과 | |
|---|---|---|---|
| Time | - | O(n) | - |
| Space | O(1) | O(1) | ✅ |
피드백: 배열의 합을 계산하는 데 O(n) 시간과 상수 공간이 필요하며, 공식 계산은 O(1)입니다.
개선 제안: 현재 구현이 적절해 보입니다.
Contributor
📊 Cyjin-jani 님의 학습 현황이번 주 제출 문제
누적 학습 요약
문제 풀이 현황
🤖 이 댓글은 GitHub App을 통해 자동으로 작성되었습니다. 🔢 API 사용량 (gpt-4.1-nano)
|
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 하나 이상을 반드시 검토를 해주셔야 합니다!