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