| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- Data Science
- Optimization
- Baekjoon
- System Call
- DFS
- Machine Learning
- CPP
- RNN
- Humble
- do it! 알고리즘 코딩테스트: c++편
- Linux
- Operating System
- C++
- computer vision
- paper review
- Robocup@Home 2026
- 밑바닥부터 시작하는 딥러닝2
- deep learning
- Seoul National University
- Process
- Python
- ROS2
- SQLD
- Gentoo2
- CNN
- file system
- On-memory file system
- BFS
- Multimedia
- cs231n
- Today
- Total
목록BFS (10)
newhaneul
본 포스팅은 서울대학교 이준석 교수님의 M2480.001100 Principles & Applications of Data Science을 수강하고 공부한 내용을 정리하기 위한 포스팅입니다. https://youtu.be/83XIXfdhx20?si=9LQ-8yzpuNljrGES 1. Graphs Graph는 정점 (Vertex)과 간선 (Edge)으로 이루어진 자료구조이다. 이때 Tree는 사이클이 없고 연결되어져 있는 특수한 그래프이다.Adjacency: 정점 u와 v 사이에 간선이 있으면 인접하다고 말한다.Degree: 한 정점에 연결된 간선 개수Path: 정점들을 연속해서 잇는 간선들의 나열Simple path: 정점을 중복해서 지나지 않는 경로Cycle: 시작 정점과 끝 정점이 같은 경로Conne..
본 포스팅은 서울대학교 이준석 교수님의 M2480.001100 Principles & Applications of Data Science을 수강하고 공부한 내용을 정리하기 위한 포스팅입니다. https://youtu.be/8dD4ANue7NY?si=1eOVMOqqAywiAfKf 1. Stacks 동작 구조 선형 자료구조, 한쪽 끝(top) 에서만 넣고 빼는 구조이다.LIFO (Last-In, First-Out) : 나중에 들어간 데이터가 먼저 나온다.기본 연산 push(x) : 맨 위(top)에 원소 x를 넣는다.pop() : 맨 위 원소를 꺼내서 제거한다. top() : 맨 위 원소를 “보기만” 한다. (peek)size() : 스택에 들어 있는 원소 개수empty() : 비었는지 여부 Array ..
본 포스팅은 Do it! 알고리즘 코딩테스트: C++편을 토대로 공부한 내용을 정리하기 위한 포스팅입니다.https://github.com/KwonKiHyeok/Do_it_Alogrithm_Coding_Test_with_Cpp GitHub - KwonKiHyeok/Do_it_Alogrithm_Coding_Test_with_Cpp: Do it! 알고리즘 코딩 테스트: C++편Do it! 알고리즘 코딩 테스트: C++편. Contribute to KwonKiHyeok/Do_it_Alogrithm_Coding_Test_with_Cpp development by creating an account on GitHub.github.com 8-1 그래프의 표현 Edge List Edge List는 Edge를 중심..
본 포스팅은 Do it! 알고리즘 코딩테스트: C++편을 토대로 공부한 내용을 정리하기 위한 포스팅입니다.https://github.com/KwonKiHyeok/Do_it_Alogrithm_Coding_Test_with_Cpp GitHub - KwonKiHyeok/Do_it_Alogrithm_Coding_Test_with_Cpp: Do it! 알고리즘 코딩 테스트: C++편Do it! 알고리즘 코딩 테스트: C++편. Contribute to KwonKiHyeok/Do_it_Alogrithm_Coding_Test_with_Cpp development by creating an account on GitHub.github.com 너비 우선 탐색(Breadth-First Search) 너비 우선 탐색(Br..
# Baekjoon 10026번: 적록색약import syssys.setrecursionlimit(10**9)from collections import dequeinput = sys.stdin.readlineN = int(input())painting = [[] for _ in range(N)]nor_visited = [[] for _ in range(N)]abnor_visited = [[] for _ in range(N)]normal, abnormal = 0, 0for i in range(N): paint = input().rstrip() for j in paint: painting[i].append(j) nor_visited[i].append(0) ab..
# Baekjoon 16928번: 뱀과 사다리 게임 import sys from collections import deque input = sys.stdin.readline N, M = map(int, input().split()) visited = [0 for _ in range(101)] ladder = [tuple(map(int, input().split())) for _ in range(N)] snake = [tuple(map(int, input().split())) for _ in range(M)] visited_ladder = [None for _ in range(101)] visited_snake = [None for _ in range(101)] for x, y in ladder: visi..
# Baekjoon 14940번: 쉬운 최단거리 import sys from collections import deque input = sys.stdin.readline n, m = map(int, input().split()) arr = [] sol_arr = [[None] * m for _ in range(n)] des_x, des_y = -1, -1 for i in range(n): distance = list(map(int, input().split())) arr.append(distance) for j in range(m): if distance[j] == 2: des_x = j des_y = i elif distance[j] == 0: sol_arr[i][j] = 0 def BFS(): sol..
# Baekjoon 11724번: 연결 요소의 개수 import sys from collections import deque input = sys.stdin.readline N, M = map(int, input().split()) visited = [None for _ in range(N+1)] graph = [[] for _ in range(N+1)] cnt = 0 for i in range(M): u, v = map(int, input().split()) graph[u].append(v) graph[v].append(u) def BFS(i): global cnt q = deque() q.append(graph[i]) visited[i] = True while q: for v in q.popleft(..