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