일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Lv. 2
- bfs
- Lv. 1
- 문자열
- 파이썬
- 스택
- programmers
- Stack
- group by
- 타입스크립트
- level3
- Java
- dfs
- SQL 고득점 KIT
- Python
- C언어
- Typescript
- 다이나믹프로그래밍
- softeer
- DP
- 브루트포스
- javascript
- Dynamic Programming
- 프로그래머스
- Lv. 3
- level 3
- 너비 우선 탐색
- 소프티어
- 자바스크립트
- Lv. 0
- Today
- Total
목록bfs (19)
몸과 마음이 건전한 SW 개발자
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/132266?language=javascript 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드function solution(n, roads, sources, destination) { const answer = []; // 노드 저장 const adjL = Array(n+1).fill().map(() => []); for (const [start, to] of roads) { adjL[start]..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/67259 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드function solution(board) { const n = board.length; const [er, ec] = [n-1, n-1]; const maxCosts = 25 * 25 * 500 + 1; let visited = Array(n).fill().map(() => Array(n).fill().map(() => Array(4).fill().map(()..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/49189?language=javascript 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드function solution(n, edge) { let answer = 0; let maxD = 0; const queue = []; const adjL = Array(n+1).fill().map(() => []); for (const [start, to] of edge) { adjL[start].p..
문제 링크https://www.acmicpc.net/problem/11724 정답 코드import sysfrom collections import dequeinput = sys.stdin.readlinen, m = map(int, input().split(" "))adjL = [[] for _ in range(n+1)]for i in range(m): start, to = map(int, input().split()) adjL[start].append(to) adjL[to].append(start)visited = [0 for _ in range(n+1)]answer = 0for j in range(1, n+1): if visited[j]: continue answ..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/1829 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드import java.util.Deque;import java.util.ArrayDeque;class Solution { public boolean isValid(int nr, int nc, int n, int m) { return 0 deque = new ArrayDeque(); // 주의 // deque.add..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/92343?language=python3 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드from collections import dequedef solution(info, edges): answer = 0 lenI = len(info) adjL = [[] for _ in range(lenI)] for start, to in edges: adjL[start].append(to) q = deque..