Skip to content

[DoDo] Week 1 #655

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 8 commits into from
Dec 15, 2024
Merged

[DoDo] Week 1 #655

merged 8 commits into from
Dec 15, 2024

Conversation

y00eunji
Copy link
Contributor

@y00eunji y00eunji commented Dec 9, 2024

답안 제출 문제

체크 리스트

  • PR을 프로젝트에 추가하고 Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 Status를 In Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@y00eunji y00eunji added the js label Dec 9, 2024
@y00eunji y00eunji requested a review from heypaprika December 9, 2024 01:45
@y00eunji y00eunji self-assigned this Dec 9, 2024
@y00eunji y00eunji requested a review from a team as a code owner December 9, 2024 01:45
@y00eunji y00eunji changed the title [y00eunji] Week 1 [DoDo] Week 1 Dec 9, 2024
@DaleSeo
Copy link
Member

DaleSeo commented Dec 9, 2024

@y00eunji 님, 현재 프로젝트에 주차 설정이 되어 있지 않습니다.

Shot 2024-12-09 at 07 05 03

답안 제출 가이드예제 PR 참고 부탁드립니다.

@y00eunji
Copy link
Contributor Author

@y00eunji 님, 현재 프로젝트에 주차 설정이 되어 있지 않습니다.

Shot 2024-12-09 at 07 05 03

답안 제출 가이드예제 PR 참고 부탁드립니다.

변경했습니다. 감사합니다!😭

Copy link
Contributor

@obzva obzva left a comment

Choose a reason for hiding this comment

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

풀이하느라 수고하셨습니다!
주석과 적절한 변수 명명 덕분에 리뷰하기 매우 수월했습니다
시간이 많이 남았으니 시/공간 복잡도에 대한 분석도 같이 남겨주시면 좋겠습니다 :)

// 1. 이전 집까지의 최대 금액 (현재 집 스킵)
// 2. 전전 집까지의 최대 금액 + 현재 집 금액 (현재 집 선택)
for (let i = 2; i < len; i++) {
dp[i] = Math.max(dp[i - 1], dp[i - 2] + nums[i]);
Copy link
Contributor

Choose a reason for hiding this comment

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

안녕하세요~ 😊
해당 점화식을 잘 살펴보면 dpi, i-1, i-2번 요소만 사용하고 있다는 걸 알 수 있습니다
아직 시간이 좀 남았으니 공간 복잡도 최적화에 도전해보시면 어떨까요?

@SamTheKorean SamTheKorean merged commit 9ce8782 into DaleStudy:main Dec 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants