Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

2022年03月30日 문제 풀이 추가합니다. #9

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

Merged
codeisneverodd merged 4 commits into codeisneverodd:main from createhb21:main_local
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
k번째 수 새로운 문제 추가 및 README 수정
  • Loading branch information
createhb21 committed Mar 30, 2022
commit dc27ab8253b62a68598d3b4a79b36a0a25364ea5
2 changes: 1 addition & 1 deletion README.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
### Level 2 👨🏻‍💻(풀이 중..)

- 전체 문제 수: 64문제
- 풀이 문제 수: 43문제(2022.03.28)
- 풀이 문제 수: 45문제(2022.03.30)
- 풀이 완료 예상 시점: 2022년 4월 중

### Level 3
Expand Down
13 changes: 13 additions & 0 deletions level-2/K-번째수.js
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//https://github.com/codeisneverodd/programmers-coding-test
//완벽한 정답이 아닙니다.
//정답 1 - createhb21

function solution(array, commands) {
let answer = [];
for(let i = 0; i < commands.length; i++){
let eachCommand = commands[i]
let slice = array.slice(eachCommand[0] - 1, eachCommand[1]);
answer.push(slice.sort((a, b) => a - b)[eachCommand[2] - 1])
}
return answer;
}

AltStyle によって変換されたページ (->オリジナル) /