Selection algorithm: Difference between revisions

Content deleted Content added
m an erroneous variable name was used in a function in a code.
Line 49:
'''return''' list[left] // Return that element
// select pivotIndex between left and right
pivotNewIndex := partition(list, left, right, pivotIndexk) // Using 'k' as the pivot index to partition the list
pivotDist := pivotNewIndex - left + 1
// The pivot is in its final sorted position,