Merge Sort

Algorithm

  • Split the list into the smallest components.
  • Compare adjacent elements and perform swaps placing elements in order.
  • Continue to merge the partitions until the list is sorted.

Performance

  • Worst case: $O(n\log{n})$
  • Best case: $O(n\log{n})$
  • Average case: $O(n\log{n})$
  • Space complexity: $O(n)$ for a table, $O(1)$ for a list.

Implementations


fuss/algorithms/sorting/merge_sort.txt ยท Last modified: 2022/04/19 08:28 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.