Skip to content
Snippets Groups Projects
Verified Commit 4f4ff083 authored by Bertrand  NÉRON's avatar Bertrand NÉRON
Browse files

:bug: fix typing

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