Download Jar. Libraryless. Click here for Pure Java version (919L/7K).
!7 static L<S> l = splitAtSpace("This is a list to permutate ."); p { for (int i = 0; i <= l(l); i++) { L<S> ll = takeFirst(l, i); print("\nPermutating: " + ll); time "Permutating" { LL<S> perm = allPermutations(ll); } print("Have " + n(perm, "permutation")); assertEquals(factorial(i), l(perm)); assertEquals(l(new HashSet(perm)), l(perm)); pnl(perm); } print("\nOK (probably)"); }
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: | #1010321 |
| Snippet name: | Test allPermutations [OK] |
| Eternal ID of this version: | #1010321/5 |
| Text MD5: | 27844d0a56a3f85de212d015b65464ca |
| Transpilation MD5: | 2534446feac7f071d8f48d55b4366c34 |
| 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 01:12:15 |
| Source code size: | 433 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 870 / 1924 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |