Update QuickSort.py

This commit is contained in:
ForeignGods 2022-06-01 15:17:36 +02:00
parent 06dc12607d
commit 469cf8421b

View File

@ -110,12 +110,7 @@ def partition(array, low, high):
i = low
j = high
while True:
iframe += 1
for cube in cubes:
cube.keyframe_insert(data_path="location", frame=iframe)
while array[i].scale.z < pivot.scale.z:
#add 1 to comparison counter
@ -133,6 +128,11 @@ def partition(array, low, high):
if i >= j:
return j
else:
iframe += 1
for cube in cubes:
cube.keyframe_insert(data_path="location", frame=iframe)
array[i].location.x = j
array[j].location.x = i