-
Notifications
You must be signed in to change notification settings - Fork 27
박성훈 / 주중8A / 20회차 #431
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: 주중8A
Are you sure you want to change the base?
박성훈 / 주중8A / 20회차 #431
The head ref may contain hidden characters: "\uC8FC\uC9118"
Conversation
dorrion
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주 고생 많으셨습니다! 다음 주도 화이팅!
주중8/hun0613/week19/과일장수.js
Outdated
| let answer = 0; | ||
| let sortedScore = score.sort((a,b)=>a-b); | ||
|
|
||
| while(sortedScore.length >= m){ |
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.
옹 while문을 사용하셨군요
주중8/hun0613/week19/과일장수.js
Outdated
| while(sortedScore.length >= m){ | ||
| let box = []; | ||
| for (let i = 0; i < m; i++){ | ||
| box.push(sortedScore.pop()); |
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.
push가 O(n)이어서 여기서 바로 더하는 방법을 이용하시면 시간복잡도를 더 줄일 수 있을 것 같아요!
주중8/hun0613/week19/소수만들기.js
Outdated
| function solution(nums) { | ||
| let count = 0; | ||
|
|
||
| for (let i = 0; i < nums.length - 2; i++){ |
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.
3중 for문 채용할 수 밖에..
주중8/hun0613/week19/피보나치수.js
Outdated
| fibo[i] = (fibo[i-2] + fibo[i-1]) % 1234567; | ||
| } | ||
|
|
||
| return fibo.pop(); |
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.
pop을 사랑하시는 성훈님
No description provided.