-
-
Notifications
You must be signed in to change notification settings - Fork 195
[이혜준] Week3 문제 풀이 #397
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
[이혜준] Week3 문제 풀이 #397
Conversation
var twoSum = function (nums, target) { | ||
for (let i = 0; i < nums.length; i++) { | ||
for (let j = i + 1; j < nums.length; j++) { | ||
if (nums[i] + nums[j] === target) { | ||
return [i, j]; | ||
} | ||
} | ||
} | ||
}; |
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.
네 의견 감사합니다. 자료구조 활용하는 방법을 고민해보겠습니다!
안녕하세요~ 이제 자동 워크플로 통해 언어 label 이 붙을 거라 직접 추가해주지 않으셔도 됩니다! |
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
로 설정해주세요.