-
-
Notifications
You must be signed in to change notification settings - Fork 247
[chordpli] Week3 Solutions #1808
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
feat: 1주차 1,2 문제
* feat: 242 문제 * feat: 70 문제 * feat: leetcode / 15 / success / 투포인터
파일 마지막에 개행 문자를 추가해주셔야 할 것 같습니다~! |
@seungriyou 감사합니다 ! 수정했습니다! |
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주차 고생많으셨어요 🙌
다음 주도 파이팅입니다!!
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 current_idx >= len(candidates): | ||
return | ||
|
||
add_value = sum(current_arr) + candidates[current_idx] |
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.
매번 sum(current_arr)을 계산하면 비효율적이기에 현재 합계를 변수로 관리하는 방법 추천드립니다
result.append(current_arr.copy()) | ||
current_arr.pop() | ||
|
||
if add_value > target: |
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.
이 조건 이후 바로 return해서 다음 인덱스로 넘어가는 아이디어는 좋으나 너무 깊은 재귀가 발생할 수 있어 주의가 필요합니다
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.
오.. 감사합니다! 비슷한 상황이 있을 때, 참고해서 회피하도록 하겠습니다!
@suhyenim @printjin-gmailcom 감사합니다! |
답안 제출 문제
작성자 체크 리스트
In Review
로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!