🐛 fix typing

parent 07984a8e
import itertools
from typing import Generator, Optional
from typing import Iterator, Optional
class NDGraph:
......@@ -78,7 +78,7 @@ class Node:
return n
def DFS(graph: Graph, node: Node) -> Generator[Node]:
def DFS(graph: NDGraph, node: Node) -> Iterator[Node]:
"""
**D**epth **F**irst **S**earch.
We start the path from the node given as argument,
......@@ -102,7 +102,7 @@ def DFS(graph: Graph, node: Node) -> Generator[Node]:
yield n
def BFS(graph: Graph, node: Node) -> Generator[Node]:
def BFS(graph: NDGraph, node: Node) -> Iterator[Node]:
"""
**B**readth **F**irst **s**earch
We start the path from the node given as argument,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment