sisestussorteerimine
Sisestussorteerimine, known in English as insertion sort, is a simple sorting algorithm that builds the final sorted array one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort. However, insertion sort provides several advantages: it is simple to implement, efficient for small data sets, and efficient for data sets that are already substantially sorted.
The algorithm works by iterating through the input array and, for each element, finding the correct position
Insertion sort is an in-place sorting algorithm, meaning it does not require additional memory space proportional