Update QuickSort.py
This commit is contained in:
10
QuickSort.py
10
QuickSort.py
@@ -111,11 +111,6 @@ def partition(array, low, high):
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user