Selection algorithm: Difference between revisions

Content deleted Content added
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 3 templates: del empty params (2×); hyphenate params (7×); del |ref=harv (1×);
Partial selection sort: The swap shall be made at the end and NOT inside the inner "for" loop.
Line 32:
minIndex = j
minValue = list[j]
swap list[i] and list[minIndex]
'''return''' list[k]