Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/betomoedano/JavaScript-Coding-Interview-Questions
/ swap
Function
swap
recursion/permutations.js:20–24 ·
view source on GitHub ↗
(i, j, array)
Source
from the content-addressed store, hash-verified
18
}
19
20
function
swap(i, j, array) {
21
const
temp = array[i];
22
array[i] = array[j];
23
array[j] = temp;
24
}
25
26
//
27
// Time O(n!)
Callers
1
permutationsHelper
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected