-
-
Notifications
You must be signed in to change notification settings - Fork 299
[ymir0804] WEEK 01 solutions #2017
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
base: main
Are you sure you want to change the base?
Conversation
| if (idx == -1) { | ||
| continue; | ||
| } | ||
| list.remove(idx); |
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.
오 list 에서 하나씩 지워나가는것도 방법이네요👍
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.
@geegong
제가 자료구조에는 익숙하지가 않아서.. 좀 무식한 방법을 사용한 것 같은데.. 시간복잡도상 상관이 없는지는 잘 모르겠네요 ㅠㅠ
|
|
||
| class Solution { | ||
| public int[] topKFrequent(int[] nums, int k) { | ||
| Set<Integer> unique = Arrays.stream(nums).boxed().collect(Collectors.toSet()); |
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.
오 boxed() 메소드는 몰랐네요ㅎㅎ
덕분에 하나 배워갑니다~ 굳이 항상 mapToInt() 요런식으로 할 필요가 없네요 😅
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.
첫 주차 문제풀이 넘 고생많으셨습니다~ 👍
(+ 작성해주신 코드 마지막에 빈 한 줄씩 추가 해줘야 병합할 수 있을거같아요~)
https://github.com/DaleStudy/leetcode-study/wiki/%EB%8B%B5%EC%95%88-%EC%A0%9C%EC%B6%9C-%EA%B0%80%EC%9D%B4%EB%93%9C#3-%ED%8C%8C%EC%9D%BC%EC%9D%98-%EB%A7%88%EC%A7%80%EB%A7%89%EC%97%90-%EA%B0%9C%ED%96%89%EB%AC%B8%EC%9E%90%EB%A5%BC-%EC%B6%94%EA%B0%80
contains-duplicate/ymir0916.java
Outdated
| } | ||
| return false; | ||
| } | ||
| } |
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.
마지막에 한줄 추가해야 merge가 될거 같아요~~
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.
@geegong 넵 확인했습니다 마지막 한줄 추가하겠습니다!
답안 제출 문제
작성자 체크 리스트
In Review로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!