-
-
Notifications
You must be signed in to change notification settings - Fork 195
[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
Conversation
left++; | ||
right--; | ||
} | ||
return true; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
비트연산을 사용한 풀이는 익숙치않아 생각을 못하고
저는 재귀적으로 풀었는데 이렇게도 풀 수 있네요!
dp[0] = 1; | ||
dp[1] = s[0] !== '0' ? 1 : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dp를 이용해 푸는걸 수식화하는걸 떠올리지 못해서 이부분 저는 제대로 처리못했는데 풀이가 깔끔하네요
제 경우에는 백트래킹으로 풀었는데, 나중에 백트래킹으로 풀어보면 다양한 풀이법으로 접근해보실수 있을거같아 공유드려요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hsskey 공유 감사합니다
@clara-shin 마지막 문제가 안올라와서 먼저 리뷰를 먼저시작했는데 아직 마지막 문제가 안올라와서 확인 부탁드립니다. |
@hsskey 좀 늦었습니다.. git push를 하지 않았더라구요 ^_^; 마지막 문제까지 완료했습니다. |
@hsskey 리뷰 승인 부탁드려요! 😊 |
수고 많으셨습니다. 확인 완료했습니다 |
ㅎㅎ 감사합니다! 즐거운주말 되세요!! |
답안 제출 문제
작성자 체크 리스트
In Review
로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!