What is Merge Sort?
Merge Sort is a divide and conquer sorting algorithm.
It divides the array into halves, sorts them, and merges them.
Steps
- Divide array into two halves
- Recursively sort both halves
- Merge the sorted halves
Time Complexity
Merge Sort runs in O(n log n) time.