Selection algorithm: Difference between revisions

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