Home Manual Reference Source

src/permutation.js

/**
 * Allocates a new permutation of given input size.
 *
 * @param {number} n The size of the permutation to allocate.
 * @returns {Array} The allocated permutation.
 */
export function permutation(n) {
	return new Array(n);
}