Skip to content

Commit 47240a6

Browse files
committed
heap sort python updated
1 parent c6400ff commit 47240a6

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.vscode/settings.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"python.linting.pylintEnabled": true,
3+
"python.pythonPath": "/Users/3zz/anaconda3/bin/python"
4+
}

heap-sort/extra-heap-sort-python/MaxHeap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class MaxHeap:
99

10-
def __init__(self, data, capacity=10):
10+
def __init__(self, data=None, capacity=10):
1111
if not data:
1212
self._data = [None] * (capacity + 1)
1313
self._count = 0
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import random

0 commit comments

Comments
 (0)