Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 296 Bytes

README.md

File metadata and controls

27 lines (17 loc) · 296 Bytes

Merge Sort

Usage

from mergesort import sort

sort([1,3,2,4])

The sort function

Arguments:

  • List/array of ints
    • [1,3,2,6,4]

Return value:

  • Sorted array
    • [1,2,3,4,6]

What is merge sort?

  1. Sort left half
  2. Sort right half
  3. Merge halves together