Update QuickSort.py
This commit is contained in:
parent
06dc12607d
commit
469cf8421b
12
QuickSort.py
12
QuickSort.py
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user