combinatorics tag

1 questions


1 answers
46 views
0
To obtain all possible permutations from a list

How do we find all possible permutations as elements of the list?For example, permutations([1, 2]) ->[1, 2][2, 1]permutations([1, 2, 3]) ->[1, 2, 3][1, 3, 2][2, 1, 3][2, 3, 1][3, 1, 2][3, 2, 1]W...


© 2024 OneMinuteCode. All rights reserved.