Original Post
Hey all. I was hoping some one could help me out with a problem with combinations. What I''m trying to do is to generate a complete list of combinations from a given set. Say I have a set of 52, with a grouping of 5. I know I will be just shy of 2.6 million combinations. Calculating that number isn''t the problem, it''s getting all those unique results. What I''m doing right now, is to generate all 5 numbers, starting with 1,2,3,4,5 and checking for duplicates, I order the numbers highest to lowest, I then search a linked list to see if I''ve seen that combination before, and if not, I add it to my linked list. If I have seen it, I increment my set of numbers to 1,2,3,4,6 and so on. Is there a faster way to do this? When testing it takes multiple hours to generate this. Also, the group size is variant, so I can''t use nested for loops.