Selection algorithm: Difference between revisions

Content deleted Content added
Undid revision 539028250 by Pratikgilda037 (talk)
Line 102:
'''//get the median of the five-element subgroup'''
subLeft = left + i*5
subRight = subLeft + 54
if (subRight > right) subRight = right
medianIdx = selectIdx(list, subLeft, subRight, 2) '''//alternatively, use a faster method that works on lists of size 5'''