mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-07 11:37:36 +08:00
Remove useless code in doctests (#7733)
* refactor: Fix matrix display deprecation * refactor: Remove useless `print` and `pass` statements * revert: Replace broken doctests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * revert: Fix failing doctests * chore: Satisfy pre-commit Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
501a1cf0c7
commit
61eedc16c3
@ -9,20 +9,20 @@ class Heap:
|
||||
>>> unsorted = [103, 9, 1, 7, 11, 15, 25, 201, 209, 107, 5]
|
||||
>>> h = Heap()
|
||||
>>> h.build_max_heap(unsorted)
|
||||
>>> print(h)
|
||||
>>> h
|
||||
[209, 201, 25, 103, 107, 15, 1, 9, 7, 11, 5]
|
||||
>>>
|
||||
>>> h.extract_max()
|
||||
209
|
||||
>>> print(h)
|
||||
>>> h
|
||||
[201, 107, 25, 103, 11, 15, 1, 9, 7, 5]
|
||||
>>>
|
||||
>>> h.insert(100)
|
||||
>>> print(h)
|
||||
>>> h
|
||||
[201, 107, 25, 103, 100, 15, 1, 9, 7, 5, 11]
|
||||
>>>
|
||||
>>> h.heap_sort()
|
||||
>>> print(h)
|
||||
>>> h
|
||||
[1, 5, 7, 9, 11, 15, 25, 100, 103, 107, 201]
|
||||
"""
|
||||
|
||||
|
Reference in New Issue
Block a user