MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / sortArray

Function sortArray

javascript/0912-sort-an-array.js:8–10  ·  view source on GitHub ↗
(nums)

Source from the content-addressed store, hash-verified

6 * @return {number[]}
7 */
8const sortArray = function (nums) {
9 return mergeSort(0, nums.length - 1, nums);
10};
11
12const mergeSort = (left, right, nums) => {
13 if (left === right) return nums;

Callers

nothing calls this directly

Calls 1

mergeSortFunction · 0.85

Tested by

no test coverage detected