graph = [[] for _ in range(3)]
graph[0].append((1, 7))
graph[0].append((2, 5))
graph[1].append((0, 7,))
print(graph)
'코테 > Algorithm & 방식' 카테고리의 다른 글
[Algorithm] 선택 정렬 (0) | 2024.03.21 |
---|---|
[Algorithm] BFS (0) | 2024.03.21 |
[Algorithm] DFS (0) | 2024.03.21 |
[방식] [완전 탐색] int형을 str형으로 활용하는 예 (0) | 2024.03.21 |
[방식] [구현] 좌표 활용 방법 예시 (0) | 2024.03.21 |