-
-
Notifications
You must be signed in to change notification settings - Fork 195
[mike2ox] Week1 #653
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
[mike2ox] Week1 #653
Conversation
안녕하세요 @mike2ox 님! 번거롭게 해서 정말 죄송해요! |
@HC-kang 넵! 문제풀고 제출하면서 확인해보겠습니다 :) 감사합니다! |
house-robber/mike2ox.ts
Outdated
|
||
// 남은 집을 순회하면서 최대값을 구함 | ||
for (let i = 2; i < nums.length; i++) | ||
dp[i] = Math.max(dp[i - 1], dp[i - 2] + nums[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요~ 점화식을 잘 보면 반복문 내에서 dp[i], dp[i - 1], dp[i - 2]
이렇게 세 요소만 사용하고 있다는 것을 알 수 있는데요
아직 제출까지 시간이 좀 남았으니 공간복잡도 최적화를 도전해보시면 어떨까요? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
한번 해보겠습니다. 🙆♂️
답안 제출 문제
체크 리스트
In Review
로 설정해주세요.