Question: You are to submit minimum three page paper describing the sorts you implemented and your results. Your paper should be double-spaced with margins and font
You are to submit minimum three page paper describing the sorts you implemented and your results. Your paper should be double-spaced with margins and font according to the APA standards. Please site any references using APA. Grading Scale for Final Paper: Paper conforms to APA standards 100 points Paper less than 3 pages -20 points Paper contains grammatical errors, spelling, etc. -10 points for each infraction No references cited -10 points
This is my sorts
def partition(arr,low,high):
i = ( low-1 ) # index of smaller element
pivot = arr[high] # pivot
for j in range(low , high):
# If current element is smaller than or
# equal to pivot
if arr[j] <= pivot:
# increment index of smaller element
i = i+1
arr[i],arr[j] = arr[j],arr[i]
arr[i+1],arr[high] = arr[high],arr[i+1]
return ( i+1 )
def quickSort(arr,low,high):
if low < high:
# pi is partitioning index, arr[p] is now
# at right place
pi = partition(arr,low,high)
# Separately sort elements before
# partition and after partition
quickSort(arr, low, pi-1)
quickSort(arr, pi+1, high)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
