일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- iterator
- 파이썬
- 시바견
- Python
- LeetCode
- attribute
- Protocol
- 운영체제
- Decorator
- Class
- Python Code
- kaggle
- Regular Expression
- 30. Substring with Concatenation of All Words
- 315. Count of Smaller Numbers After Self
- concurrency
- 밴픽
- Convert Sorted List to Binary Search Tree
- 109. Convert Sorted List to Binary Search Tree
- data science
- 컴퓨터의 구조
- Python Implementation
- DWG
- t1
- 43. Multiply Strings
- Generator
- 715. Range Module
- shiba
- Substring with Concatenation of All Words
- 프로그래머스
Archives
- Today
- Total
목록가장 먼 노드 (1)
Scribbling
프로그래머스: 가장 먼 노드
다익스트라 알고리즘을 사용한다. 참고: https://focalpoint.tistory.com/6 최단 거리 알고리즘 최단 거리 알고리즘을 정리해보자. 1. 다익스트라 알고리즘 - 하나의 node로부터 다른 모든 node까지의 최단거리를 계산 가능 - 음의 간선이 없는 경우에만 유효 - O(VlogV) import heapq def dijkstra(start): pq focalpoint.tistory.com import heapq def solution(n, edge): answer = 0 max_dist = 0 graph = [[] * (n+1) for _ in range(n+1)] for e in edge: u, v = e graph[u].append(v) graph[v].append(u) dista..
Computer Science/Coding Test
2021. 11. 5. 21:20