Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
// 归并
37
function
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
45
function
merge(arr, arr2) {
46
let
result = []
Callers
3
sort2
Function · 0.85
split
Method · 0.85
sortList
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected