일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Generator
- DWG
- concurrency
- kaggle
- 43. Multiply Strings
- 715. Range Module
- 파이썬
- LeetCode
- Python Code
- Decorator
- Substring with Concatenation of All Words
- t1
- Class
- 운영체제
- 컴퓨터의 구조
- 시바견
- shiba
- attribute
- Protocol
- Regular Expression
- 30. Substring with Concatenation of All Words
- Python
- 315. Count of Smaller Numbers After Self
- 109. Convert Sorted List to Binary Search Tree
- 프로그래머스
- data science
- 밴픽
- iterator
- Python Implementation
- Convert Sorted List to Binary Search Tree
Archives
- Today
- Total
목록1584. Min Cost to Connect All Points (1)
Scribbling
LeetCode: 1584. Min Cost to Connect All Points
class Solution: def minCostConnectPoints(self, points: List[List[int]]) -> int: def calc_Dist(p1, p2): d1 = abs(p1[0] - p2[0]) d2 = abs(p1[1] - p2[1]) return d1 + d2 def find_parent(parent, a): if parent[a] == a: return a parent[a] = find_parent(parent, parent[a]) return parent[a] def union_parent(parent, a, b): a = find_parent(parent, a) b = find_parent(parent, b) if a < b: parent[b] = a else: ..
Computer Science/Coding Test
2021. 8. 13. 22:56