Download Jar. Libraryless. Click here for Pure Java version (643L/5K).
1 | !7 |
2 | |
3 | static L<S> l = splitAtSpace("one two three four five six seven eight nine ten!"); |
4 | static LL<S> perm; |
5 | |
6 | p { |
7 | L<S> ll = l; |
8 | print("\nPermutating: " + ll); |
9 | time "Permutating" { perm = allPermutations(ll); } |
10 | print("Have " + n(perm, "permutation")); |
11 | assertEquals(factorial(l(ll)), l(perm)); |
12 | assertEquals(l(new HashSet(perm)), l(perm)); |
13 | print("\nOK (probably)"); |
14 | //pnl(perm); |
15 | } |
Began life as a copy of #1010321
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010343 |
Snippet name: | Test allPermutations(10) |
Eternal ID of this version: | #1010343/3 |
Text MD5: | c6a46c21fc89dff62881a9e5312c69e8 |
Transpilation MD5: | d537cd4493e7afb1265cedd63895df48 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-12 02:35:38 |
Source code size: | 403 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 542 / 1113 |
Version history: | 2 change(s) |
Referenced in: | [show references] |