일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Stack
- 다이나믹프로그래밍
- dfs
- DP
- Typescript
- level 3
- Dynamic Programming
- group by
- programmers
- 프로그래머스
- 문자열
- SQL 고득점 KIT
- Java
- 타입스크립트
- Lv. 1
- javascript
- C언어
- softeer
- 자바스크립트
- 소프티어
- Lv. 3
- Python
- 파이썬
- Lv. 2
- 브루트포스
- 너비 우선 탐색
- 스택
- level3
- Lv. 0
- bfs
- Today
- Total
목록bfs (18)
몸과 마음이 건전한 SW 개발자
문제 링크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..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/12978?language=python3 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드from collections import dequedef solution(N, road, K): answer = 0 adjL = [[] for _ in range(N+1)] for start, to, time in road: adjL[start].append((to, time)) adjL[to].append((s..