lp means left pivot and rp means right pivot
lp , rp = partition ( arr , low , high ) NEW_LINE dualPivotQuickSort ( arr , low , lp - 1 ) NEW_LINE dualPivotQuickSort ( arr , lp + 1 , rp - 1 ) NEW_LINE dualPivotQuickSort ( arr , rp + 1 , high ) NEW_LINE def partition ( arr , low , high ) : NEW_LINE if arr [ low ] > arr [ high ] : NEW_LINE arr [ low ] , arr [ high ] = arr [ high ] , arr [ low ] NEW_LINE