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
- 자바
- axios
- json-server
- 매일메일
- 리액트
- 이코테
- react
- 알고리즘
- redux-saga
- programmers
- Algorithm
- maeil-mail
- 코딩테스트합격자되기
- 항해플러스
- Get
- 프로그래머스
- redux-toolkit
- SW
- JavaScript
- sw expert academy
- java
- 항해99
- createSlice
- 테코테코
- redux
- C++
- react-router
- react-redux
- Python
- useDispatch
Archives
- Today
- Total
목록From (1)
Binary Journey
[Javascript] Array.from(), Array.prototype.reduce() (feat. 프로그래머스 다리를 지나는 트럭)
프로그래머스에서 풀다 막힌 문제인데 내 첫 식은 이랬다. function solution(bridge_length, weight, truck_weights) { let seconds = 0; let onBridge = [ ...truck_weights ]; do { let sumWeight = onBridge.reduce((accumulator, currentValue) => accumulator + currentValue, 0); if (sumWeight + waitings[0] 0); do { onBridge.shift(); seconds++; if (truck_weights.length) { let sumWeight = onBridge.reduce((accumulator, currentValue) ..
Javascript
2021. 4. 21. 13:29