반응형
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 |
Tags
- 그래프
- dp
- 프로그래머스 레벨 2
- 백준
- socket
- 문자열
- 수학
- type challenge
- BFS
- 프로그래머스
- HTTP
- javascript
- 레벨 1
- ip
- HTTP 완벽 가이드
- 가천대
- 크롤링
- 알고리즘
- Node.js
- 자바스크립트
- dfs
- TCP
- Algorithm
- 소켓
- typescript
- Crawling
- 타입 챌린지
- 쉬운 문제
- Nestjs
- 타입스크립트
Archives
- Today
- Total
목록나누어 떨어지는 수 (1)
kakasoo

// 프로그래머스 level1 나누어 떨어지는 수 문제를 풀었습니다. function solution(arr, divisor) { var answer = []; arr.map((el, i) => { if (!(el % divisor)) { answer.push(el); } }) if (!answer.length) answer.push(-1); return answer.sort((o1,o2) => o1 - o2); } 딱히 설명할 게 없는 코드다.
프로그래밍/알고리즘 풀이
2021. 6. 25. 17:13