To Sort or not to Sort

Write your question here.
I am trying to write a program to answer a question of mine. But I don’t know where to start. I feel that if I defined each card as having 4 variables I would have to set up a very big Boolean loop. That is what I’m trying to avoid. So I hope you can be patient with my introductory so that you can understand what I’m trying to do.
I have a deck of 100 flash cards. The first one is numbered 1. Each progressive card is 1 whole number greater than the previous card (I seem to recall something about how C++ can track/tally numbered events????). On each card are four variables (from a list of 55 variables). I have the first five cards below.
Flash_Card_One (Variable 52, Variable 26, Variable 54, Variable 24);
Flash_Card_Two (Variable 5, Variable 12, Variable 4, Variable 14);
Flash_Card_Three (Variable 5, Variable 30, Variable 41, Variable 13);
Flash_Card_Four (Variable 46, Variable 18, Variable 45, Variable 52);
Flash_Card_Five (Variable 41, Variable 55, Variable 19, Variable 26);
As you can see there are a few similarities between various cards. My goal is to find what three (out of the 100) cards together will give me the greatest number of similarities. Here is my approach were I to do it myself. Picture a poker like table top with three flash card sized outlines on the table (left slot, middle slot, and right slot). I would grab Card_One and place it on left slot (first function???). Then check to see if Card_Two had any similarities with Card_One. If it does not, continue grabbing the next highest Card until there is an exact match between at least one variable. When a match is found, it would be allocated to the middle slot. And then for the right slot the same actions would be done starting from the lowest numbered card available. From my list above, here is the first three card combo.
Card_One + Card_Four + Card_Five
This would result in 4 similarities between the three cards. After the program considers every possible combo, I would like to see the list of combos arranged from highest number of similarities in descending order. Because 1+4+5 works, so to would 1+5+4, 4+1+5 and so on. I would like to prevent any repeats to make my list shorter. That’s all for now, I hope you can help Thanks.

Topic archived. No new replies allowed.