Sort Algorithm - Merge Sort
Last updated on September 12, 2023 pm
Definition
Merge Sort is a comparison-based, divide-and-conquer sorting algorithm known for its stability and efficiency. It works by dividing the unsorted array into smaller subarrays until each subarray contains only one element. It then merges these subarrays back together while sorting them, resulting in a sorted array. Merge Sort has a consistent time complexity of O(n log n), making it a reliable choice for sorting large datasets.
Code
1 |
|
Sort Algorithm - Merge Sort
http://hihiko.zxy/2023/09/12/Sort-Algorithm-Merge-Sort/