(Python/LV3) 네트워크
문제 소스: https://school.programmers.co.kr/learn/courses/30/lessons/43162 설명: from collections import deque def solution(n, computers): graph = (() for _ in range(n+1)) visited = (False) *(n+1) count = 0 for idx, i in enumerate(computers): for j in range(len(i)): if computers(idx)(j) == 1 and idx != j : graph(idx+1).append(j+1) for i in range(1,n+1): if visited(i) == False: dfs(idx,graph,visited) count += … Read more