Sorting algorithms/Selection sort: Difference between revisions

Updated to work with version 1.4 of Nim.
(Updated to work with version 1.4 of Nim.)
Line 2,350:
<lang nim>proc selectionSort[T](a: var openarray[T]) =
let n = a.len
for i in 0 .. < n:
var m = i
for j in i .. < n:
if a[j] < a[m]:
m = j
Anonymous user