-
-
Notifications
You must be signed in to change notification settings - Fork 305
[khg0712] WEEK 01 solutions #1976
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
|
|
||
|
|
||
| for (const index of nums.keys()) { | ||
| const v = nums[index]; |
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.
nit: LeetCode에서 복붙하시다가 indentation이 어긋난 거 같습니다.
| } | ||
|
|
||
| // 한 번 사용한 숫자는 제거 | ||
| set.delete(_num); |
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.
Typescript for loop과 Set이 어떻게 작동하는지 모르지만, iteration 중에 건드는 것은 위험할 것 같습니다. 혹시 위험하지 않은 이유가 있다면 설명해주시면 배우도록 하겠습니다.
HashSet에서 lookup 하는 건 O(1)이라 HashSet의 크기는 별로 중요하지 않을 거 같고. isStart로 이미 시작 시점이 되는 숫자부터 확인하도록 하셨기 때문에 이 부분이 없어도 답을 구하는데 문제 없어 보입니다.
TonyKim9401
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.
1주차 문제 풀이 고생하셨습니다!
온보딩 및 스터디 적응 하시는데 앞으로 조금 더 힘내주시고 앞으로의 15주간 여정 응원합니다.
2주차 문제 풀이도 파이팅입니다!
|
디스코드와 깃허브 닉네임 매칭 부탁드립니다. |
답안 제출 문제
작성자 체크 리스트
In Review로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!