-
-
Notifications
You must be signed in to change notification settings - Fork 246
[hypoxisaurea] Week 1 Solutions #1722
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
|
||
lookup[num] = i | ||
|
||
raise ValueError('No answer') |
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.
파이썬으로 알고리즘 풀면서 raise 키워드 사용한 error 처리는 해본 적이 없네요. 좋은 코드 배워갑니다!
for num in nums: | ||
if num in num_set: | ||
return True | ||
else: |
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.
else를 사용하지 않고 바로 num_set.add(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.
수고하셨습니다 :)
if len(result) == k: | ||
return result | ||
|
||
return result |
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.
세개의 모든 파일 린트에러로 VS 사용시는 'VSCode 설정 : "files.insertFinalNewline": true" 으로 해결 혹은 각 파일에 한줄씩 빈 줄을 추가하여 에러 해결하고 머지 해주시길 바랍니다.
답안 제출 문제
작성자 체크 리스트
In Review
로 설정해주세요.검토자 체크 리스트
Important
본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!