Skip to content

Instantly share code, notes, and snippets.

@amejiarosario
Created January 13, 2020 22:29
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/0948db7c3b65ed678b6b3c930d4dcdc4 to your computer and use it in GitHub Desktop.
Save amejiarosario/0948db7c3b65ed678b6b3c930d4dcdc4 to your computer and use it in GitHub Desktop.
getPermutations('a') // => [ 'a']
getPermutations('ab') // => [ 'ab', 'ba']
getPermutations('abc') // => [ 'abc', 'acb', 'bac', 'bca', 'cab', 'cba' ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment