|
|
|
|
|
by plingbang
929 days ago
|
|
Sounds like Selection sort[1]. It was probably the first sorting algorithm I ever implemented. I don't know why bubble sort is usually taught first. Selection sort seems more obvious. Perhaps the implementation is slightly harder due to the need to keep track of two indexes. 1. https://en.wikipedia.org/wiki/Selection_sort |
|