Skip to content

[jiji-hoon96] WEEK 03 Solutions#2446

Open
jiji-hoon96 wants to merge 3 commits intomainfrom
jiji-hoon96/week3
Open

[jiji-hoon96] WEEK 03 Solutions#2446
jiji-hoon96 wants to merge 3 commits intomainfrom
jiji-hoon96/week3

Conversation

@jiji-hoon96
Copy link
Contributor

@jiji-hoon96 jiji-hoon96 commented Mar 18, 2026

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

- valid-palindrome
- number-of-1-bits
- maximum-subarray
@github-actions github-actions bot added the ts label Mar 18, 2026
@jiji-hoon96 jiji-hoon96 changed the title Jiji hoon96/week3 [jiji-hoon96] WEEK 03 Solutions Mar 18, 2026
@riveroverflows riveroverflows self-requested a review March 18, 2026 19:55
return true;
}

for (let i = word.length - 1; i >= 0; i--) {
Copy link
Contributor

Choose a reason for hiding this comment

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

저도 비슷하게 정규식으로 필터링하고 비교하는 방식으로 풀었는데, 혹시 투포인터 방식도 고려해보셨나요? 공간복잡도 차이가 있어서 여유되시면 투포인터로도 풀어보시면 재밌을 거예요!

let count = 0;

while (n !== 0) {
n &= n - 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

저는 이 비트 트릭을 처음 알게 됐는데, 로직 자체는 간단한데 n & (n - 1)이 왜 가장 오른쪽 1비트를 지우는지 원리를 이해하는 데 시간이 좀 걸렸어요. 깔끔하게 잘 푸셨네요!

Copy link
Contributor

@riveroverflows riveroverflows left a comment

Choose a reason for hiding this comment

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

valid-palindrome, number-of-1-bits 코멘트 남겼습니다. 나머지 문제도 풀고 나서 추가 코멘트 남기겠습니다!

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.

2 participants