1- # Python program for implementation of Quicksort Sort  
1+ # Python program for implementation of Quicksort Sort 
2+ 
3+ # This function takes last element as pivot, places 
4+ # the pivot element at its correct position in sorted 
5+ # array, and places all smaller (smaller than pivot) 
6+ # to left of pivot and all greater elements to right 
7+ # of pivot 
8+ 
29
3- # This function takes last element as pivot, places  
4- # the pivot element at its correct position in sorted  
5- # array, and places all smaller (smaller than pivot)  
6- # to left of pivot and all greater elements to right  
7- # of pivot  
810def  partition (arr , low , high ):
911    i  =  (low  -  1 )  # index of smaller element 
1012    pivot  =  arr [high ]  # pivot 
@@ -22,12 +24,12 @@ def partition(arr, low, high):
2224    return  (i  +  1 )
2325
2426
25- # The main function that implements QuickSort   
26- # arr[] --> Array to be sorted,   
27- # low --> Starting index,   
28- # high --> Ending index   
27+ # The main function that implements QuickSort 
28+ # arr[] --> Array to be sorted, 
29+ # low --> Starting index, 
30+ # high --> Ending index 
2931
30- # Function to do Quick sort   
32+ # Function to do Quick sort 
3133def  quickSort (arr , low , high ):
3234    if  low  <  high :
3335        # pi is partitioning index, arr[p] is now 
0 commit comments