Skip to content

[clara-shin] WEEK 03 solutions #1288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 20, 2025
Merged

[clara-shin] WEEK 03 solutions #1288

merged 5 commits into from
Apr 20, 2025

Conversation

clara-shin
Copy link
Contributor

@clara-shin clara-shin commented Apr 14, 2025

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

left++;
right--;
}
return true;
Copy link
Member

Choose a reason for hiding this comment

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

투포인터 풀이는 생각못했는데 다양한 풀이법으로
고민하고 풀어보신점이 생각하신점이 좋습니다 👍


while (n !== 0) {
// n & (n-1)은 n의 마지막 1 비트를 제거
n = n & (n - 1);
Copy link
Member

Choose a reason for hiding this comment

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

비트연산을 사용한 풀이는 익숙치않아 생각을 못하고
저는 재귀적으로 풀었는데 이렇게도 풀 수 있네요!

Comment on lines +18 to +19
dp[0] = 1;
dp[1] = s[0] !== '0' ? 1 : 0;
Copy link
Member

Choose a reason for hiding this comment

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

dp를 이용해 푸는걸 수식화하는걸 떠올리지 못해서 이부분 저는 제대로 처리못했는데 풀이가 깔끔하네요
제 경우에는 백트래킹으로 풀었는데, 나중에 백트래킹으로 풀어보면 다양한 풀이법으로 접근해보실수 있을거같아 공유드려요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hsskey 공유 감사합니다 ☺️

@hsskey
Copy link
Member

hsskey commented Apr 19, 2025

@clara-shin 마지막 문제가 안올라와서 먼저 리뷰를 먼저시작했는데 아직 마지막 문제가 안올라와서 확인 부탁드립니다.

@clara-shin clara-shin moved this from Solving to In Review in 리트코드 스터디 4기 Apr 19, 2025
@clara-shin
Copy link
Contributor Author

@hsskey 좀 늦었습니다.. git push를 하지 않았더라구요 ^_^; 마지막 문제까지 완료했습니다.
이전 리뷰도 감사합니다!

@clara-shin
Copy link
Contributor Author

@hsskey 리뷰 승인 부탁드려요! 😊

@hsskey
Copy link
Member

hsskey commented Apr 20, 2025

수고 많으셨습니다. 확인 완료했습니다
실무에서도 자주 마주치는 부분인데, PR 올릴 때 파일 변경사항을 한 번 더 확인하는 습관을 들이면 더 좋을 것 같아 작은 팁으로 공유드려요 :)

@clara-shin
Copy link
Contributor Author

수고 많으셨습니다. 확인 완료했습니다 실무에서도 자주 마주치는 부분인데, PR 올릴 때 파일 변경사항을 한 번 더 확인하는 습관을 들이면 더 좋을 것 같아 작은 팁으로 공유드려요 :)

ㅎㅎ 감사합니다! 즐거운주말 되세요!!

@clara-shin clara-shin merged commit a204356 into DaleStudy:main Apr 20, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Completed in 리트코드 스터디 4기 Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

2 participants