valikusorteerimine
Valikusorteerimine, also known as selection sort in English, is a simple comparison-based sorting algorithm. Its main idea is to repeatedly find the minimum element from the unsorted part of the list and put it at the beginning. This process continues until the entire list is sorted.
The algorithm works by dividing the input list into two parts: a sorted sublist which is built
For an array of size n, selection sort performs approximately n^2/2 comparisons and n swaps. Its time