-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.pyi
69 lines (65 loc) · 1.97 KB
/
__init__.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# pylint: skip-file
__all__: Final[list[str]] = [
"breadth_first_search",
"bubble_sort",
"depth_first_search",
"inorder",
"insertion_sort",
"levelorder",
"linear_search",
"merge_sort",
"postorder",
"preorder",
"quick_sort",
"selection_sort",
]
from typing import Final, TypeVar, overload
from nrw.datastructures import (
BinarySearchTree,
BinaryTree,
ComparableContentT,
Graph,
List,
Vertex,
)
_T = TypeVar("_T")
def linear_search(lst: List[_T], element: _T) -> int: ...
def depth_first_search(graph: Graph, vertex: Vertex) -> List[Vertex]: ...
def breadth_first_search(graph: Graph, vertex: Vertex) -> List[Vertex]: ...
def bubble_sort(lst: List[ComparableContentT]) -> List[ComparableContentT]: ...
def selection_sort(lst: List[ComparableContentT]) -> List[ComparableContentT]: ...
def insertion_sort(lst: List[ComparableContentT]) -> List[ComparableContentT]: ...
def merge_sort(lst: List[ComparableContentT]) -> List[ComparableContentT]: ...
def quick_sort(lst: List[ComparableContentT]) -> List[ComparableContentT]: ...
@overload
def preorder(tree: BinaryTree[_T], *, reverse: bool = False) -> List[_T]: ...
@overload
def preorder(
tree: BinarySearchTree[ComparableContentT],
*,
reverse: bool = False,
) -> List[ComparableContentT]: ...
@overload
def inorder(tree: BinaryTree[_T], *, reverse: bool = False) -> List[_T]: ...
@overload
def inorder(
tree: BinarySearchTree[ComparableContentT],
*,
reverse: bool = False,
) -> List[ComparableContentT]: ...
@overload
def postorder(tree: BinaryTree[_T], *, reverse: bool = False) -> List[_T]: ...
@overload
def postorder(
tree: BinarySearchTree[ComparableContentT],
*,
reverse: bool = False,
) -> List[ComparableContentT]: ...
@overload
def levelorder(tree: BinaryTree[_T], *, reverse: bool = False) -> List[_T]: ...
@overload
def levelorder(
tree: BinarySearchTree[ComparableContentT],
*,
reverse: bool = False,
) -> List[ComparableContentT]: ...