Valintasortaus
Valintasortaus, often translated as selection sort, is a simple comparison-based sorting algorithm. It works by repeatedly finding the minimum element from the unsorted part of a list and putting it at the beginning. This process is continued until the entire list is sorted.
The algorithm divides the input list into two parts: a sorted sublist and an unsorted sublist. Initially,
Valintasortaus has a time complexity of O(n^2) in all cases, meaning its performance degrades quadratically with