Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 분할정복
- vuejs
- DFS와BFS
- Flutter
- AndroidStudio
- cos pro 1급
- codingtest
- 안드로이드스튜디오
- 코드품앗이
- docker
- C++
- issue
- BAEKJOON
- 동적계획법
- DART
- 안드로이드
- Algorithm
- 백준
- 동적계획법과최단거리역추적
- 알고리즘
- django
- android
- cos pro
- 파이썬
- 개발
- 코딩테스트
- Python
- 코테
- cos
- DFS
Archives
- Today
- Total
목록cos 1급 5차 7번 python (1)
Development Artist

문제 유형 빈칸 난이도 normal Note 1. 크루스칼 알고리즘 문제. 크루스칼 알고리즘에 대해 공부하면 매우 쉬움. find, merge 함수 이름보고 크루스칼인가? 하고 유추했다. Code # -*- coding: utf-8 -*- # UTF-8 encoding when using korean def find(parent, u): if u == parent[u]: return u parent[u] = find(parent, parent[u]) # recursive, 루트노드 찾기 return parent[u] def merge(parent, u, v): u = find(parent, u) v = find(parent, v) if u == v: return True parent[u] = v # pa..
Algorithm/COS
2022. 2. 28. 17:12