Skip to content

Conversation

@radiantchoi
Copy link
Contributor

@radiantchoi radiantchoi commented Nov 26, 2025

답안 제출 문제

작성자 체크 리스트

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

검토자 체크 리스트

Important

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

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

Copy link
Contributor

@ys-han00 ys-han00 left a comment

Choose a reason for hiding this comment

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

리뷰를 너무 늦게 달아드려 죄송합니다 🥲

아직 풀이중이신거 같아서 대기하다가 까먹고 지금에서야 남기네요 ㅎㅎ

현재 풀이 올리신 것 기준으로 작성 했습니다.

늦은 만큼 바로 승인 해두겠습니다!

이번 한 주도 수고하셨습니다~

Copy link
Contributor

Choose a reason for hiding this comment

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

간단 명료한 풀이네요!

len, filter 대신 sum, map을 써서 더 짧게 가능할까? 했는데, 아쉽게도 안되네요 ㅎㅎ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

원래는 Swift에 익숙한지라, 이렇게 배열 자체를 고차함수를 통해 조작하는 것이 좀 더 직관적으로 다가왔던 것 같습니다ㅎㅎ..

Copy link
Contributor

Choose a reason for hiding this comment

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

전반적으로 깔끔한 재귀 풀이 방법같이네요!

보기 좋습니다.

Comment on lines +12 to +19
# starting 인덱스가 필요한 이유는, 결과 케이스의 원소 순서가 중요하지 않기 때문
# 즉, [2, 3]과 [3, 2]가 같은 케이스이기 때문
# 인덱스에 따른 가지치기 적용, 잠재적 중복 케이스 제거
for i in range(starting, len(candidates)):
candidate = candidates[i]

# 앞서 투입했던 current 배열을 인-메모리 조작하여 원소 삽입
current.append(candidate)
Copy link
Contributor

Choose a reason for hiding this comment

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

current[i - 1] <= current[i]를 만족하기 때문에, current를 이용하면 starting 파라미터를 제거할 수 있습니다 👍

하지만, 코드 라인이 늘어나는 단점이 있네요 ㅎㅎ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그렇네요. 정렬을 하고 나서 푸는 게 그런 효과도 있을텐데 미처 생각을 못 했던 듯 합니다. 파라미터 하나 늘어나는 것과 코드 라인이 한 줄 늘어나는 것의 트레이드오프는.. 그때그때 판단해 볼 만 하겠어요!

@radiantchoi radiantchoi moved this from Solving to In Review in 리트코드 스터디 6기 Nov 28, 2025
@radiantchoi
Copy link
Contributor Author

@ys-han00 님 리뷰 감사드립니다! 제가 이번주에 개인적인 사정으로 금요일까지 많이 못 했습니다만, 풀어서 올린 것에 대해 정성들여 리뷰해 주셔서 도움이 됐습니다. 앞으로는 풀리는 대로 빠르게 올리는 것도 괜찮겠단 생각이 드네요!

@radiantchoi radiantchoi merged commit 4c9b0d0 into DaleStudy:main Nov 30, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Completed in 리트코드 스터디 6기 Nov 30, 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.

2 participants