-
Notifications
You must be signed in to change notification settings - Fork 126
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
[suwi] Week 03 #796
[suwi] Week 03 #796
Conversation
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.
3주차도 수고 많으셨습니다 풀이를 참고해서 기존 코드를 개선하거나 여러 방법으로 풀어보시면 도움되실 것 같습니다 화이팅
if sum(comb) > target : | ||
return | ||
elif sum(comb) == target : | ||
return ans.append(comb.copy()) |
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.
if sum(comb) > target : | |
return | |
elif sum(comb) == target : | |
return ans.append(comb.copy()) | |
sum_comb = sum(comb) | |
if sum_comb > target : | |
return | |
elif sum_comb == target : | |
return ans.append(comb.copy()) |
sum의 경우, O(n)을 소요하기 때문에 2회 사용하기 보다는 변수에 저장하는 편이 좋을 것 같습니다
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.
좋은 리뷰 감사합니다!
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.