Skip to content
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

[jdy8739] Week 10 #997

Merged
merged 5 commits into from
Feb 15, 2025
Merged

[jdy8739] Week 10 #997

merged 5 commits into from
Feb 15, 2025

Conversation

jdy8739
Copy link
Contributor

@jdy8739 jdy8739 commented Feb 7, 2025

답안 제출 문제

체크 리스트

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

@jdy8739 jdy8739 requested a review from a team as a code owner February 7, 2025 17:00
@github-actions github-actions bot added the js label Feb 7, 2025
@jdy8739 jdy8739 requested a review from Chaedie February 7, 2025 17:02
Copy link
Contributor

Choose a reason for hiding this comment

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

공간 복잡도는 어떻게 될까요 :)

Copy link
Contributor Author

@jdy8739 jdy8739 Feb 15, 2025

Choose a reason for hiding this comment

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

이후 커밋에 작성되어 있습니다. 코멘트 감사합니다! :)

Copy link
Contributor

@HC-kang HC-kang left a comment

Choose a reason for hiding this comment

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

@jdy8739 님 벌써 10주차도 마무리 하셨네요!
앞으로 남은 5주도 지금처럼 꾸준하게, 조금만 더 화이팅입니다!!

return dp[dp.length - 1];
};

// 시간복잡도 O(n2) -> nums의 길이대로 순회하면서 1부터 nums[j]의 값까지 순회하는 2중 루프를 돌기 때문
Copy link
Contributor

Choose a reason for hiding this comment

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

'최대로 어디까지 점프할수 있을까?'라는 관점에서, dp 배열 대신 변수 하나만 사용하는 방법을 찾아보실 수 있지 않을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵넵 풀이를 봤는데 그런 방법도 있더라고요. 다음 문제 풀이 때 적용해보도록 하겠습니다. 코멘트 감사합니다! :)

return first;
};

// 시간복잡도 -> for문 이후 sort 이후 for문을 수행하며 이는 O(n) + O(nlogn) + O(n)이므로 O(nlogn)가 시간복잡도가 된다
Copy link
Contributor

Choose a reason for hiding this comment

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

중요한 내용은 아닙니다!

n을 아마 k개 리스트 전체의 노드 수로 사용하신 것 같은데요
문제에서 k라는 변수가 언급되어있으니, 복잡도 분석에서도 k를 사용해 주시거나 혹은 이를 활용한 해설을 덧붙여주시는것이 좋지 않을까 싶어요!

@jdy8739 jdy8739 merged commit 2dc5135 into DaleStudy:main Feb 15, 2025
1 check passed
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.

3 participants