Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/neetcode-gh/leetcode
/ reArrangeSet
Function
reArrangeSet
javascript/0046-permutations.js:62–69 ·
view source on GitHub ↗
(previousLevel, num, index)
Source
from the content-addressed store, hash-verified
60
};
61
62
const
reArrangeSet = (previousLevel, num, index) => {
63
const
[before, after] = [
64
previousLevel.slice(0, index),
65
previousLevel.slice(index),
66
];
67
68
return
[...before, num, ...after];
69
};
Callers
1
bfs
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected