Home Tutorials Training Consulting Products Books Company Donate Contact us

Online Training

Quick links


Mergesort with Java. This article describes how to implement Mergesort with Java.

3. Complexity Analysis

The following describes the runtime complexity of mergesort.

Mergesort sorts in worst case in O(n log n) time. Due to the required copying of the collection Mergesort is in the average case slower than Quicksort.


Copyright © 2012-2018 vogella GmbH. Free use of the software examples is granted under the terms of the Eclipse Public License 2.0. This tutorial is published under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany license.

See Licence.