Musings about Java and Swing

Tag Archives: List

Permutations of a Set

I came across an interesting problem on Stack Overflow a few days ago. The homework assignment was: Given a set of integers, a count C and a sum S, generate all of the possible additions of C integers, giving S. You can use an integer from the set more than once.