Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@amejiarosario
Created January 13, 2020 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amejiarosario/947cf44ab684f33a577e92490f8cd59f to your computer and use it in GitHub Desktop.
Save amejiarosario/947cf44ab684f33a577e92490f8cd59f to your computer and use it in GitHub Desktop.
time node ./lib/permutations.js
# getPermutations('abcdefghij') // => abcdefghij, abcdefghji, abcdefgihj, abcdefgijh, abcdefgjhi, abcdefgjih, abcdefhgij...
# // n = 10, f(n) = 3,628,800;
# ./lib/permutations.js 8.06s user 0.63s system 101% cpu 8.562 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment