Last updated 3 years ago
Was this helpful?
💾 程式:codesandbox - Permutations
/** * find all the permutations of an array. * @param {any[]} arr - array (of distinct elements) */ export function permutations(arr) { // base case: if (arr.length === 1)
matrix methodsfunctions