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

// 프로그래머스 레벨2 구명보트를 풀었습니다. const isEmpty = (stack) => (stack.length ? false : true); function solution(people, limit) { const sortedStack = people.sort((a, b) => a - b); let count = 0; while (!isEmpty(sortedStack)) { let sum = sortedStack.pop(); while (sortedStack.length && sum + sortedStack[0]
프로그래밍/알고리즘 풀이
2021. 6. 29. 13:17