Merge Sort Implementation
Implement a stable sorting algorithm that achieves O(N \log N) time complexity in all cases. Your solution should use a divide-and-conquer approach to sort a collection of elements. Provide a generic implementation that handles a standard dynamic array (vector) and discuss how you manage memory to minimize allocation overhead. Ensure your implementation preserves the relative order of duplicate elements.
C++Merge SortDivide and Conquer
00