Skip to content

[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

Merged
merged 5 commits into from
Aug 10, 2025
Merged

[chordpli] Week3 Solutions #1808

merged 5 commits into from
Aug 10, 2025

Conversation

chordpli
Copy link
Contributor

@chordpli chordpli commented Aug 9, 2025

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

chordpli and others added 4 commits July 26, 2025 11:39
feat: 1주차 1,2 문제
* feat: 242 문제

* feat: 70 문제

* feat: leetcode / 15 / success / 투포인터
@seungriyou
Copy link
Contributor

파일 마지막에 개행 문자를 추가해주셔야 할 것 같습니다~!

@chordpli
Copy link
Contributor Author

@seungriyou 감사합니다 ! 수정했습니다!

Copy link
Contributor

@suhyenim suhyenim left a comment

Choose a reason for hiding this comment

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

3주차 고생많으셨어요 🙌
다음 주도 파이팅입니다!!

Copy link
Contributor

@printjin-gmailcom printjin-gmailcom left a 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]
Copy link
Contributor

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:
Copy link
Contributor

Choose a reason for hiding this comment

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

이 조건 이후 바로 return해서 다음 인덱스로 넘어가는 아이디어는 좋으나 너무 깊은 재귀가 발생할 수 있어 주의가 필요합니다

Copy link
Contributor Author

Choose a reason for hiding this comment

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

오.. 감사합니다! 비슷한 상황이 있을 때, 참고해서 회피하도록 하겠습니다!

@chordpli
Copy link
Contributor Author

@suhyenim @printjin-gmailcom 감사합니다!

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

Successfully merging this pull request may close these issues.

4 participants