**Detailed Steps:** 1. **Recursive Function:** Create a fun…

chryptof ·

**Detailed Steps:**
1. **Recursive Function:** Create a function `mergeSort(array)` which:
- Checks if the length of `array` is 1 or 0, in which case it returns the array as is.
- Splits the `array` into two halves: `left` and `right`.
- Recursively calls `mergeSort(left)` and `mergeSort(right)` to sort the two halves.
- Calls a helper function `merge(left, right)` to merge the two sorted halves.