[Yiseull] WEEK 03 Solutions#2720
Open
Yiseull wants to merge 2 commits into
Open
Conversation
Contributor
📊 Yiseull 님의 학습 현황이번 주 제출 문제
누적 학습 요약
문제 풀이 현황
🤖 이 댓글은 GitHub App을 통해 자동으로 작성되었습니다. 🔢 API 사용량 (gpt-5-nano)
|
(cherry picked from commit d881c4d)
Contributor
There was a problem hiding this comment.
🏷️ 알고리즘 패턴 분석
- 패턴: Bit Manipulation
- 설명: 주어진 코드는 정수의 1비트 개수를 세기 위해 비트 연산을 사용합니다. 내부적으로 비트카운트 함수를 호출해 비트 조작 기법을 이용한 문제 풀이에 해당합니다.
📊 시간/공간 복잡도 분석
| 복잡도 | |
|---|---|
| Time | O(1) |
| Space | O(1) |
피드백: 자바 내장 함수로 간단히 비트 수를 셈으로써 상수 시간에 근접한 성능을 낼 수 있다.
개선 제안: 현재 구현이 적절해 보입니다.
💡 풀이에 시간/공간 복잡도를 주석으로 남겨보세요!
Contributor
There was a problem hiding this comment.
🏷️ 알고리즘 패턴 분석
- 패턴: Two Pointers, Sliding Window, Hash Map / Hash Set
- 설명: 문자열의 양 끝에서 문자 여부를 확인하며 비교하는 구조로, 좌우 포인터를 이동시키는 Two Pointers 패턴이 핵심이다. 필요 시 비문자도 건너뛰는 로직은 창 길이 조정 없이 양쪽 포인터를 직접 움직이는 방식으로 구성된다.
📊 시간/공간 복잡도 분석
| 복잡도 | |
|---|---|
| Time | O(n) |
| Space | O(1) |
피드백: 두 포인터로 양 끝에서 문자들을 비교하므로 추가 저장소 없이 한 번에 해결한다.
개선 제안: 현재 구현이 적절해 보입니다.
💡 풀이에 시간/공간 복잡도를 주석으로 남겨보세요!
DaleSeo
approved these changes
Jul 9, 2026
| @@ -0,0 +1,5 @@ | |||
| class Solution { | |||
| public int hammingWeight(int n) { | |||
| return Integer.bitCount(n); | |||
Member
There was a problem hiding this comment.
옷, 요런 풀이는 출제 의도와 맞지 않을지도? 면접관이 Integer.bitCount이 어떻게 동작하는 깊고 파고 들면 인터뷰가 말릴 수도 있고요. 코딩 테스트에서 표준 라이브러리를 사용하는 것은 양날의 검이 될 수 있으니 참고 바랍니다.
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 하나 이상을 반드시 검토를 해주셔야 합니다!