Dagmawi Babi
6.64K subscribers
15.3K photos
2.07K videos
236 files
2.16K links
Believer of Christ | Creative Developer.

Files Channel: https://t.me/+OZ9Ul_rSBAQ0MjNk

Community: @DagmawiBabiChat
Download Telegram
Quick Sort in Python
def sort(array):
#Sort the array by using quicksort

less = []
equal = []
greater = []

if len(array) > 1:
pivot = array[0]
for x in array:
if x < pivot:
less.append(x)
elif x == pivot:
equal.append(x)
elif x > pivot:
greater.append(x)
return sort(less)+equal+sort(greater)
else:
return array

#Telegram #Code #QuickSort #Python
@Dagmawi_Babi