mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 23:36:16 -04:00
Tidied 'Generate De Bruijn Sequence' operation
This commit is contained in:
parent
0a0217cb66
commit
d102e1b15c
2 changed files with 6 additions and 8 deletions
|
@ -4,8 +4,8 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import Operation from "../Operation";
|
||||
import OperationError from "../errors/OperationError";
|
||||
import Operation from "../Operation.mjs";
|
||||
import OperationError from "../errors/OperationError.mjs";
|
||||
|
||||
/**
|
||||
* Generate De Bruijn Sequence operation
|
||||
|
@ -58,9 +58,7 @@ class GenerateDeBruijnSequence extends Operation {
|
|||
throw new OperationError("Too many permutations, please reduce k^n to under 50,000.");
|
||||
}
|
||||
|
||||
const a = [];
|
||||
for (let i = 0; i < k * n; i++) a.push(0);
|
||||
|
||||
const a = new Array(k * n).fill(0);
|
||||
const sequence = [];
|
||||
|
||||
(function db(t = 1, p = 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue