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
- 항해99
- useDispatch
- JavaScript
- Python
- 알고리즘
- 매일메일
- maeil-mail
- json-server
- redux-saga
- 리액트
- java
- axios
- react
- programmers
- SW
- redux-toolkit
- 이코테
- Get
- react-router
- 프로그래머스
- sw expert academy
- 코딩테스트합격자되기
- 테코테코
- react-redux
- Algorithm
- redux
- C++
- 자바
- 항해플러스
- createSlice
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