Skip to content
Snippets Groups Projects
Commit 5bca91d9 authored by nilsl99's avatar nilsl99
Browse files

Fixed HeapSort

parent 44a4a99f
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ def HeapSort(array): ...@@ -25,7 +25,7 @@ def HeapSort(array):
j = p(j) j = p(j)
# Entferne max aus dem max-Heap # Entferne max aus dem max-Heap
for i in range(len(sorted_array)-1, 1, -1): for i in range(len(sorted_array)-1, 0, -1):
sorted_array[0], sorted_array[i] = sorted_array[i], sorted_array[0] sorted_array[0], sorted_array[i] = sorted_array[i], sorted_array[0]
j = 0 j = 0
while True: while True:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment