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

// 프로그래머스 레벨2 소수찾기를 풀었습니다. let visited = []; let num = []; let res = []; const dfs = (curIdx, curValue = "") => { visited[curIdx] = true; curValue += num[curIdx]; if (!res.includes(curValue)) { res.push(curValue); } for (let i = 0; i < num.length; i++) { if (visited[i] === false) { dfs(i, curValue); visited[i] = false; } } }; function solution(numbers) { num = numbers.split(""); visited = new Ar..
프로그래밍/알고리즘 풀이
2021. 6. 29. 13:08