1. Welcome to Mergesort Interactive Tutorial.
    Input your own values:
  2. Explore the content of the diagram: move mouse over / tap on the text.
  3. (1) Mergesort concepts.
  4. At the top of the diagram, an initial list contains random values (not sorted).
  5. At the bottom of the diagram, a sorted list is the result of the algorithm.
  6. Mergesort uses the concept of merging of two lists, at each step.
  7. For example, at the first level, two lists with a single value (each one) are merged into a sorted list.
  8. In a second example, at the next level, two lists with sorted values are merged into another sorted list.
  9. This procedure is repeated until the last level, with a resulting sorted list containing all values (as described in the next steps).
  10. (2) Mergesort scan process.
  11. A sub-task of Mergesort is the scan process. The scan process requires two sorted inputs to produce a sorted output.
  12. Since the inputs are sorted, the scan can be done only once for each input. While scanning the inputs, Mergesort then produces the sorted output.
  13. For example, at the last level, Mergesort scans two inputs that produce the output.
  14. At the beginning of the scan (of each input), the smallest value (for the output) is produced.
  15. The scan process always chooses the smaller value (between the two inputs) to produce the next output value.
  16. At the end of the scan (of both inputs), the largest value (for the output) is produced.
  17. (3) Advanced concepts.
  18. Mergesort is an efficient sort algorithm, and also a stable sort algorithm.
  19. Mergesort is usually employed as an external memory algorithm (over large sets of already sorted values).
  20. External memory means: the algorithm does not require main memory (RAM), instead it uses a slower memory (for example, disk drives or tape drives).
  21. In 1945, John von Neumann developed the Mergesort algorithm for EDVAC (a vacuum tube computer).
  22. The end.
    Also, visit Quicksort Interactive Tutorial.

This software is open source.