Merge Sort

Merge Sort Animation

 

Merge Sort Infographic

 

Methodology

Given array has more than one item:

  1. half array

  2. merge-sort first half

  3. merge-sort second half

  4. merge first half and second half

Complexity

Time Complexity: N log(N)
Space Complexity: N
Stable


Download Source Code
Previous
Previous

Radix Sort

Next
Next

Bubble Sort