jacen6678
09-26-2003, 12:13 PM
Does anyone know the most efficient way of iterating through all the possible distinct combinations if you are making X selections from Y unique options; 0<x<=y. For example:
What are all the combinations of cards you could get if you draw cards from a deck of 52 cards.
or
What are all the possible combinations of letters using each letter 0 or 1 times. (a, b, c... ab, ac... abc... but NOT aa. Once ab comes up, ba should not come up.)
The order of selections does not matter.
What are all the combinations of cards you could get if you draw cards from a deck of 52 cards.
or
What are all the possible combinations of letters using each letter 0 or 1 times. (a, b, c... ab, ac... abc... but NOT aa. Once ab comes up, ba should not come up.)
The order of selections does not matter.