https://school.programmers.co.kr/learn/courses/30/lessons/42586
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
const solution = (progresses, speeds) => {
return progresses.map((el, idx) => Math.ceil((100 - el) / speeds[idx])).reduce((queue, el) => {
(queue.length < 1) ? queue.push([el]) : (queue[queue.length - 1][0] >= el) ? queue[queue.length - 1].push(el) : queue.push([el]);
return queue;
}, []).map((arr) => arr.length);
}
GitHub - developeSHG/Algorithm-Baekjoon_Programmers: 백준 and 프로그래머스 소스코드
백준 and 프로그래머스 소스코드. Contribute to developeSHG/Algorithm-Baekjoon_Programmers development by creating an account on GitHub.
github.com
'Coding Test > Programmers' 카테고리의 다른 글
[Programmers] (깊이/너비 우선 탐색[DFS/BFS]) Lv 2. 타겟 넘버 (0) | 2023.02.15 |
---|---|
[Programmers] (스택/큐) Lv 2. 프린터 (0) | 2023.02.14 |
[Programmers] (월간 코드 챌린지 시즌3) Lv 2. n^2 배열 자르기 (0) | 2023.02.10 |
[Programmers] (2019 카카오 개발자 겨울 인턴십) Lv 2. 튜플 (0) | 2023.02.09 |
[Programmers] (해시) Lv 2. 의상 (0) | 2023.02.07 |
댓글