Created
January 13, 2020 22:32
-
-
Save amejiarosario/23778653056826d460c23d38d7304ba9 to your computer and use it in GitHub Desktop.
Revisions
-
amejiarosario created this gist
Jan 13, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ getPermutations('ab') // ab, ba... // n = 2, f(n) = 2; getPermutations('abc') // abc, acb, bac, bca, cab, cba... // n = 3, f(n) = 6; getPermutations('abcd') // abcd, abdc, acbd, acdb, adbc, adcb, bacd... // n = 4, f(n) = 24; getPermutations('abcde') // abcde, abced, abdce, abdec, abecd, abedc, acbde... // n = 5, f(n) = 120;