Skip to content

Instantly share code, notes, and snippets.

View s311354's full-sized avatar
🍀
I may be slow to respond.

Louisliu s311354

🍀
I may be slow to respond.
View GitHub Profile
@leimao
leimao / graph.py
Last active December 15, 2022 09:15
Graph Traversal
from typing import Iterable, List, Union, Set
class Graph:
def __init__(self) -> None:
# Adjacency set representation.
# key: node name, value: adjacency node name set.
self.edges = dict()