반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- dfs
- 쉬운 문제
- 알고리즘
- 프로그래머스 레벨 2
- TCP
- Node.js
- 크롤링
- typescript
- socket
- Crawling
- Algorithm
- 타입 챌린지
- Nestjs
- 그래프
- javascript
- 레벨 1
- 타입스크립트
- 백준
- HTTP 완벽 가이드
- 가천대
- HTTP
- dp
- type challenge
- 자바스크립트
- 문자열
- ip
- 프로그래머스
- 수학
- BFS
- 소켓
Archives
- Today
- Total
목록K번째 수 (1)
kakasoo

// 프로그래머스 level1 k번째 수 const solution = (array, commands) => new Array(commands.length).fill(0).map((el, i) => i + 1).map(el => array.slice(commands[el-1][0] - 1, commands[el-1][1]).sort((o1, o2) => o1 - o2)[commands[el-1][2] -1]); 이 때 내가 왜 이렇게 풀었는지 기억이 나지 않는다. 그냥 함수형 컨셉을 해보고 싶었던 모양이다. 당연히 저런 가독성 없는 코드를 평소에도 짜는 건 아니다. const solution = (array, commands) => { const answer = []; commands.forEach((l..
프로그래밍/알고리즘 풀이
2021. 6. 25. 16:45