Skip to content

Commit 3627416

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 60cb936 commit 3627416

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

data_structures/heap/skew_heap.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
from collections.abc import Iterable, Iterator
66
from typing import Any, Generic, TypeVar, Protocol
77

8+
89
class Comparable(Protocol):
910
def __lt__(self, other: Any) -> bool: ...
1011
def __gt__(self, other: Any) -> bool: ...
1112

13+
1214
T = TypeVar("T", bound=Comparable)
1315

1416

@@ -90,6 +92,7 @@ def merge(
9092

9193
return result
9294

95+
9396
class SkewHeap(Generic[T]):
9497
"""
9598
A data structure that allows inserting a new value and to pop the smallest

0 commit comments

Comments
 (0)