mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 10:31:29 +08:00
Flake8: Drop ignore of issue A003 (#7949)
* Flake8: Drop ignore of issue A003 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -88,13 +88,6 @@ class Heap:
|
||||
for i in range(self.heap_size // 2 - 1, -1, -1):
|
||||
self.max_heapify(i)
|
||||
|
||||
def max(self) -> float:
|
||||
"""return the max in the heap"""
|
||||
if self.heap_size >= 1:
|
||||
return self.h[0]
|
||||
else:
|
||||
raise Exception("Empty heap")
|
||||
|
||||
def extract_max(self) -> float:
|
||||
"""get and remove max from heap"""
|
||||
if self.heap_size >= 2:
|
||||
|
Reference in New Issue
Block a user