Skip to content

Conversation

SamTheKorean
Copy link
Contributor

No description provided.

@@ -0,0 +1,19 @@
# TC : O(n)
# SC : O(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

dp 라는 array를 만들기 때문에 O(n) 이 되어야 할 것 같습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

아 실수했군요! 피드백 감사합니다!

@SamTheKorean SamTheKorean marked this pull request as ready for review July 5, 2024 22:25
@DaleSeo DaleSeo requested a review from WhiteHyun July 7, 2024 19:39
@DaleSeo
Copy link
Member

DaleSeo commented Jul 7, 2024

@WhiteHyun 님, 이 PR에 대한 코드 리뷰를 좀 부탁드려도 될까요? (관련 가이드 참고)

Copy link
Member

@WhiteHyun WhiteHyun left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 :)
(리뷰가 늦어서 죄송합니다)

Comment on lines +6 to +11
if n == 1:
return nums[0]
if n == 2:
return max(nums[0], nums[1])
if n == 3:
return max(nums[0], max(nums[1], nums[2]))
Copy link
Member

Choose a reason for hiding this comment

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

이 부분은 n <= 3일 때 max(nums)로 해결할 수 있을 것 같아보여요. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그렇게 하면 더 간결하겠군요! 피드백 감사합니다!

@SamTheKorean SamTheKorean merged commit 14b4e50 into DaleStudy:main Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants