Sorts an array by repeatedly finding the smallest element of the unosrted tail region and moving it to the front
The algorithm is not stable by default, but it’s possible to make it stable
One advantage of selection osrt is that it requires only O(n) write operations. If we have a system where write operations are extremly expensive and read operations are not, then selection sort could be ideal. One such scenario would be if we are sorting a file in-place on flash memory or an external hard drive.
Mergesort is an example of a divide-and-conquer algorithm that recursively splits the problem into branches, and later combines them to form the solution.
External sorting is a term for a class of sorting algorithms that can handle massive amounts of data. External sorting is required when the data being sorted do not fit into the main memory of a computing device (usually RAM) and instead they must reside in the slower external memory (usually a hard drive). Mergesort is suitable for external sorting.