Leetcode 풀기 | 1192. Critical Connections in a Network / 127. Word Ladder


Leetcode 풀기 | 1192. Critical Connections in a Network / 127. Word Ladder

1192. Critical Connections in a Network 출체 회사: Amazon 115, Google 2 개념: Depth-First-Search class Solution: def criticalConnections(self, n: int, connections: List[List[int]]) -> List[List[int]]: visited = [False for _ in range(n)] graph = [[] for _ in range(n)] lowestRank = [0 for _ in range(n)] time = 0 for connection in connections: graph[connection[0]].append(connection[1]) graph[connection[1]].append(connection[0]) criticalConnection = [] def dfs(visited, parentNode, currNode, time): visited...


#Leetcode문제풀이 #릿코드문제풀이 #미국코딩인터뷰준비

원문링크 : Leetcode 풀기 | 1192. Critical Connections in a Network / 127. Word Ladder