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

[EGON] Week 01 Solutions #322

Merged
merged 4 commits into from
Aug 16, 2024
Merged

[EGON] Week 01 Solutions #322

merged 4 commits into from
Aug 16, 2024

Conversation

@EgonD3V EgonD3V self-assigned this Aug 13, 2024
@EgonD3V EgonD3V changed the title [EGON] Week01 Solutions [EGON] Week 01 Solutions Aug 13, 2024
stack = [root]
while stack:
curr_node = stack.pop()
heappush(visited, curr_node.val)
Copy link
Contributor

Choose a reason for hiding this comment

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

다양한 풀이로 하셔서 좋네요 :) 요부분 조금 궁금한게 있는데, bst의 heappush의 Time complexity가 제 기억엔 logn 이었던거로 기억하는데, 혹시 어떻게 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.

n개의 노드를 순회하며 각각 heap push를 하니 말씀하신 것 처럼 n * log n 이 맞습니다. 주석 복붙하다 빼먹은 것 같네요. 리뷰 감사합니다.

@leokim0922
Copy link
Contributor

일단 5문제 다 풀으신거 같아 ready to review 로 전환했습니다 :)

@leokim0922 leokim0922 marked this pull request as ready for review August 13, 2024 22:36
@DaleSeo
Copy link
Contributor

DaleSeo commented Aug 14, 2024

@lymchgmk 님, 답안 코드에서 고수의 향기가 나요!

bruce-is-a-typing-boss-bruce-almighty

최초로 2가지 언어로 답안을 제출하는 분이 탄생하나요? ㅋㅋ

@EgonD3V
Copy link
Contributor Author

EgonD3V commented Aug 14, 2024

@lymchgmk 님, 답안 코드에서 고수의 향기가 나요!

부끄럽습니다...

@EgonD3V
Copy link
Contributor Author

EgonD3V commented Aug 15, 2024

@leokim0922 수정 및 swift 풀이 추가했습니다
@mangodm-web 아래 PR의 kim-young 님은 리뷰어로 등록이 안되어있어서... 대신 리뷰를 부탁드립니다

Comment on lines +51 to +52
if len(vals) >= k:
return
Copy link
Contributor

Choose a reason for hiding this comment

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

이 조건으로 빠르게 탐색을 마칠 수 있어 정말 좋네요! 👍

@nhistory nhistory merged commit 03b5623 into DaleStudy:main Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

5 participants