Skip to content

Commit ae755a6

Browse files
authored
Update skew_heap.py
1 parent 34da76f commit ae755a6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

data_structures/heap/skew_heap.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
#!/usr/bin/env python3
21

32
from __future__ import annotations
43

54
from collections.abc import Iterable, Iterator
6-
from typing import Any, Generic, TypeVar
5+
from typing import Any, TypeVar
76

8-
T = TypeVar("T", bound=bool)
7+
T = TypeVar("T")
98

109

11-
class SkewNode(Generic[T]):
10+
class SkewNode[T]:
1211
"""
1312
One node of the skew heap. Contains the value and references to
1413
two children.
@@ -86,8 +85,7 @@ def merge(
8685

8786
return result
8887

89-
90-
class SkewHeap(Generic[T]):
88+
class SkewHeap[T]:
9189
"""
9290
A data structure that allows inserting a new value and to pop the smallest
9391
values. Both operations take O(logN) time where N is the size of the

0 commit comments

Comments
 (0)