The combinatorics tag has no wiki summary.
6
votes
13answers
684 views
Code-Golf: Permutations
Write a function that takes as input a set of integers (can be a list, array or any other container with distinct numbers), and outputs the list of all its permutations.
Python (95 chars):
p=lambda ...
3
votes
7answers
645 views
Generating combinations without recursion
Given a list of strings and a length, give all combinations of that list with the given length. The problem is: your code must not be recursive. Yes, it can be done. I have done it myself, when I had ...