Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 프로그래머스
- 격파르타 후기
- Roads and Libraries
- 격파르타 장점
- 백준
- Special String Again
- Algorithm
- DFS: Connected Cell in a Grid
- hackerrank
- Reverse Shuffle Merge
- Find the nearest clone
- 해커랭크
- 매칭점수
- Max Array Sum
- python
- Common Child
- 격파르타 합격후기
- Interview Preparation Kit
- 구슬탈출2
- 알고리즘
- 야근지수
- programmers
- 머신러닝
- 피보나치 함수
- Recursion: Davis' Staircase
- [sqld]자격증합격
- 코딩테스트
- candies
- BFS: Shortest Reach in a Graph
- 파이썬
Archives
- Today
- Total
목록Find the nearest clone (1)
Archive

https://www.hackerrank.com/challenges/find-the-nearest-clone/problem Find the nearest clone | HackerRank Find the shortest path length between any two nodes with the given condition. www.hackerrank.com 풀이 그래프 정보와 각 노드의 색깔 저보가 주어짐. 특정 색깔을 입력받았을 때 같은 색깔의 다른 노드에 도달할 수 있는 최단 거리를 구하는 문제 먼저 adj_matrix를 만들어주는데, 파이썬의 dictionary를 사용. key : node, value : [인접 노드] 방향이 없기 때문에 graph_from, graph_to에 있는 노드를 번갈아..
공부/Algorithm
2020. 9. 4. 16:22