Skip to content

Conversation

mmyeon
Copy link
Contributor

@mmyeon mmyeon commented Dec 16, 2024

답안 제출 문제

체크 리스트

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

@mmyeon mmyeon self-assigned this Dec 16, 2024
@mmyeon mmyeon requested a review from a team as a code owner December 16, 2024 05:20
@github-actions github-actions bot added the ts label Dec 16, 2024
@mmyeon mmyeon requested a review from KwonNayeon December 16, 2024 05:22
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.

@mmyeon 님, 훌륭한 풀이에 각 분석과 접근법까지 상세하게 설명해 주셨네요
남은 문제들도 더 좋은 풀이 해주시면 좋겠습니다!

@KwonNayeon
Copy link
Contributor

KwonNayeon commented Dec 20, 2024

@mmyeon 님 안녕하세요! TypeScript는 처음이라 생소했는데, 주석을 자세하게 달아주셔서 코드를 이해하기 쉬웠습니다 :) indentation도 깔끔하게 해주셔서, 리뷰하면서 많이 배울 것 같습니다!

Comment on lines +17 to +30
function climbStairs(n: number): number {
if (n <= 2) return n;

let prevPrevSteps = 1;
let prevSteps = 2;

for (let i = 3; i <= n; i++) {
const currentSteps = prevPrevSteps + prevSteps;
prevPrevSteps = prevSteps;
prevSteps = currentSteps;
}

return prevSteps;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

TypeScript는 잘 몰라서 제 파이썬 코드와 비교해봤는데, @mmyeon 님 코드를 통해서 중간 결과를 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.

@KwonNayeon
안녕하세요! 귀중한 시간 내어서 코드 리뷰 해주셔서 정말 감사합니다 👍
저도 다른 분들 풀이 참고해서 작성해보았는데 도움이 되셨다니 뿌듯합니다.
다시 한번 감사드립니다 :)

@mmyeon mmyeon merged commit 27b2e07 into DaleStudy:main Dec 21, 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.

3 participants