Content deleted Content added
Vedantkumar (talk | contribs) m →Selection by sorting: a parenthetical reference to radix sort |
|||
Line 104:
subRight = subLeft + 4
if (subRight > right) subRight = right
medianIdx = selectIdx(list, subLeft, subRight, (subRight - subLeft) / 2)
'''//move the median to a contiguous block at the beginning of the list'''
swap list[left+i] and list[medianIdx]
|