Skip to content

Commit 9e031e9

Browse files
committed
Fixed spacing
1 parent de8c5cb commit 9e031e9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sorts/heap_sort.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def heap_sort(unsorted):
4242
>>> heap_sort([-2, -5, -45])
4343
[-45, -5, -2]
4444
"""
45-
n=len(unsorted)
46-
for i in range (n/2 - 1 , -1, -1) :
45+
n=len(unsorted)
46+
for i in range (n/2 - 1 , -1, -1):
4747
heapify(unsorted,i,n)
4848
for i in range(n - 1, -1, -1):
4949
unsorted[0], unsorted[i] = unsorted[i], unsorted[0]
@@ -61,4 +61,3 @@ def heap_sort(unsorted):
6161
user_input = input_function('Enter numbers separated by a comma:\n')
6262
unsorted = [int(item) for item in user_input.split(',')]
6363
print (heap_sort(unsorted))
64-

0 commit comments

Comments
 (0)