human
QuickSort Tail Call Optimization ( Reducing worst case space to Log n ) | Python3 program for the above approach.
pi is partitioning index , arr [ p ] is now at right place.
Separately sort elements before partition and after partition"
How can the above be solved in Python?
assistant
#Here is code to quickSort Tail Call Optimization ( Reducing worst case space to Log n ) and the other steps required.
 def quickSort ( arr , low , high ) :
	if ( low < high ) :
		pi = partition ( arr , low , high )
		quickSort ( arr , low , pi - 1 )
		quickSort ( arr , pi + 1 , high )