-
-
Notifications
You must be signed in to change notification settings - Fork 303
[jaejeong1] WEEK 01 solutions #1981
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
Conversation
|
@DaleStudy 리뷰해줘 |
|
좋은 작업입니다! 특히 두 문제에 대해 명확한 설명과 깔끔한 코드가 돋보입니다. 몇 가지 피드백을 드리자면, 첫째, 시간과 공간 복잡도에 대한 분석을 코드 내에 주석으로 명확히 포함시키면 이해와 검증이 더 쉬워집니다. 둘째, Longest Consecutive Sequence 문제에서 Top K Elements 문제에서는 우선순위 큐를 활용한 방식이 적절하며, 클린 코드와 효율적인 접근법입니다. 이 부분도 복잡도 분석을 주석으로 넣어주면 더욱 좋겠어요. 전반적으로, 코드 스타일이 깔끔하고, 주석도 명확하여 학습에 도움이 될 내용입니다. 앞으로도 다양한 문제를 도전하며, 복잡도 분석과 가독성을 함께 고려하는 습관을 계속 유지하세요! |
ppxyn1
left a comment
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.
고생하셨습니다.
| .mapToInt(i -> i) | ||
| .limit(k) // 배열에서 상위 k개만 반환 | ||
| .toArray(); | ||
| Queue<Integer> heap = new PriorityQueue<>((x, y) -> count.get(x) - count.get(y)); |
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.
안녕하세요.
우선순위큐를 써야지 O(n log(K))가 가능하군요.
작성을 잘해주셔서 새로 배웠네요!
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.
네, 저도 다시 풀어보니 힙(우선순위큐)를 써야 하더라구요 ㅎㅎ 감사합니다!
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라고 적혀있는데요, 모든 문제 풀이가 완료된 후 승인하는 것인지 확인 후 Approve 하겠습니다.
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.
(Review changes), 죄송합니다. 제가 착각하고 있었나 봅니다.
문제를 모두 푸시면 프로젝트에서 Status를 In Review 설정이나, 5문제중 2문제 풀이하셨습니다.
ppxyn1
left a comment
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로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!