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

[pepper] Week 6 Solutions #479

Merged
merged 7 commits into from
Sep 22, 2024
Merged

[pepper] Week 6 Solutions #479

merged 7 commits into from
Sep 22, 2024

Conversation

whewchews
Copy link
Contributor

답안 제출 문제

체크 리스트

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

@whewchews whewchews requested a review from a team as a code owner September 20, 2024 17:51
@github-actions github-actions bot added the ts label Sep 20, 2024
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.

이번 한 주도 고생 많으셨습니다~!

@@ -0,0 +1,39 @@
function spiralOrder(matrix: number[][]): number[] {
Copy link
Contributor

Choose a reason for hiding this comment

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

크 복잡한 조건이나 visited 같은 부수적인게 하나도 없는 깔끔한 코드네요 👍

design-add-and-search-words-data-structure/whewchews.ts Outdated Show resolved Hide resolved
}

// TC: O(m*n)
// SC: O(m*n)
Copy link
Contributor

Choose a reason for hiding this comment

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

Space complexity가 O(m*n)인 이유가 혹시 ans 배열 때문일까요?

보통 return하는 정답 객체는 공간 복잡도에 포함시키지 않는 것으로 알고 있습니다 :)

valid-parentheses/whewchews.ts Outdated Show resolved Hide resolved
Comment on lines +27 to +30
const lastOpenChar = openCharStack.pop();
if (lastOpenChar !== pair) {
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

stack이 비어 있는 경우도 처리해주어야 하지 않나 싶었는데, JS에선 빈 배열을 pop할 때 undefined를 반환한다는 사실 덕분에 알아 갑니다 ㅎㅎ

@SamTheKorean SamTheKorean merged commit 6dd8755 into DaleStudy:main Sep 22, 2024
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.

4 participants