반응형
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
- 프로그래머스
- 자바스크립트
- 가천대
- ip
- Node.js
- typescript
- 문자열
- BFS
- 타입 챌린지
- TCP
- 그래프
- 크롤링
- 소켓
- Algorithm
- type challenge
- 수학
- Nestjs
- 알고리즘
- dp
- 프로그래머스 레벨 2
- 쉬운 문제
- HTTP 완벽 가이드
- dfs
- javascript
- 타입스크립트
- socket
- Crawling
- 백준
- HTTP
- 레벨 1
Archives
- Today
- Total
목록가장 먼 노드 (1)
kakasoo
[node.js] 가장 먼 노드 ( 프로그래머스 레벨3 )
// 프로그래머스 레벨 3 가장 먼 노드를 풀었습니다. const solution = (n, edge) => { const map = new Array(n + 1).fill(0); for (let i = 1; i { const [from, to] = el; map[from].push(to); map[to].push(from); }); const visited = new Array(n + 1).fill(0); visited[0] = -1; const bfs = (start) => { const queue = [start]; visited[start] = 1; while (queue.length) { con..
프로그래밍/알고리즘 풀이
2021. 7. 2. 17:06