MCPcopy
hub / github.com/HuberTRoy/leetCode / split

Function split

Array/KthLargestElementInAnArray.js:37–43  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

35
36// 归并
37function split(arr) {
38 let bean = Math.floor((arr.length-1) / 2)
39 let left = arr.slice(0, bean)
40 let right = arr.slice(bean)
41
42 return [left, right]
43}
44
45function merge(arr, arr2) {
46 let result = []

Callers 3

sort2Function · 0.85
splitMethod · 0.85
sortListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected