반응형
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
- 가천대
- 프로그래머스
- 자바스크립트
- type challenge
- 백준
- Algorithm
- Node.js
- dfs
- 쉬운 문제
- 타입 챌린지
- 문자열
- TCP
- 소켓
- 프로그래머스 레벨 2
- socket
- ip
- HTTP 완벽 가이드
- 타입스크립트
- 크롤링
- 레벨 1
- HTTP
- Nestjs
- 수학
- Crawling
- dp
- javascript
- 알고리즘
- 그래프
- BFS
- typescript
Archives
- Today
- Total
목록숫자 영단어와 문자열 (1)
kakasoo
[node.js] 숫자 문자열과 영단어 ( 프로그래머스 레벨 1 )
// 프로그래머스 레벨 1 숫자 문자열과 영단어를 풀었습니다. const numbers = [ "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", ]; const solution = (s) => { const str = s.split(""); let stack = []; let answer = ""; for (const a of str) { if (isNaN(Number(a))) { stack.push(a); const num = numbers.findIndex((el) => el === stack.join("")); if (num !== -1) { answer += String(num); stack = []; }..
프로그래밍/알고리즘 풀이
2021. 8. 12. 23:24