MyExperimentsWithJava

Collection of different java problems, techniques and tutorials

View on GitHub

Merge Sort

Merge Sort is a divide and conquer algorithm. Essentially what it does is 2 things:

Time Complexity : O(nLogn)

This is an example diagram for merge sort execution sequence taken from GeeksForGeeks logo

As you can guess, the main logic of merge sort is in the merge() method.

Source Code