Merge Sort

Performance Metrics

Array Size: 40

Number of Swaps: 0

Elements Checked: 0

How it works

Merge Sort is a smart way to sort a list by breaking it into smaller pieces and then putting them back together in the right order. First, the list is split in half, then each half is split again, over and over, until only single pieces remain. Then, the pieces are merged back together, making sure everything stays in order. This method is fast, working in O(n log n) time complexity.