Personal website Rudolf Adamkovič

Home / Computer science


Merge sort

A recursive sort algorithm in two steps:

  • for \(x = (x_1)\) return \(x\)
  • for \(x = (x_1, x_2)\) return \((x_2, x_1)\) if \(x_1 > x_2\) and \(x\) otherwise
  • otherwise split \(x\) into halves and merge-sort them


© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.