Lexicographer

in code


I went back and owned the fuck out of Problem 24. I present to you a fully-functional functional lexicographic permutation generator generator. Hail Satan! \m/

#!/usr/bin/env node

const lexicographer = require('lexicographer');
const array = [...Array(10).keys()];
const breakpoint = 1000000;
let permutations = 0;

for (let value of lexicographer.permute(array)) {
    permutations++;

    if (permutations === breakpoint) {
        console.log(value.join(''));
        break;
    }
}

https://github.com/bhalash/lexicographer
https://www.npmjs.com/package/lexicographic-generator



March 20

in me

Happy Dissonance

in me

Knocknarea

in ireland


Your email address will not be published. Required fields are marked *