Your question is Sort Array Without Builtins. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Globallogic QA automation may need deterministic ordering of numeric test data without relying on Python's built-in sorting implementation. Implement a stable merge sort that returns the values in nondecreasing order.
Your function must not call sort(), sorted(), or any library sorting helper. The original input list must remain unchanged. Duplicate values must be preserved, and the algorithm should meet the required O(n log n) time bound.
nums, a Python list of integers.nums in nondecreasing order.def merge_sort(nums):