Merge sort is a divide and conquer sorting algorithm with a worst-case time complexity of O(n log n) that sorts an array by recursively dividing it into smaller subarrays and merging them back in order. The algorithm features a stable sort and is particularly efficient for linked lists and large datasets. Its space complexity is O(n) due to the need for temporary storage during the merging process.
Related topics: