Reputation: 95
Actually sorting techniques are two types according to memory usage. One is that internal Another one is that external.
Insertion selection exchange sorts are internal sorts. That means they are processed in internal memory.
But I don't know about merge sort?
Upvotes: 0
Views: 1613
Reputation: 134055
You can certainly write a completely internal merge sort. See https://www.geeksforgeeks.org/merge-sort/ for an example.
People often talk about an "external merge sort", but that often works out to a two-pass sorting technique where you successively load small portions of a large file into memory, sort them, and write them to disk. In the second pass, you merge those multiple portions into a single sorted file. See https://en.wikipedia.org/wiki/External_sorting for details.
Upvotes: 2