Iteration/Recursion problem? -


I am working on a program where my two 2D arrays are called men and a woman both of them There are 3x3 size in the array, the score is the number of one person liked the other.

i.e. (Male array) This means that the female choice of male is 8, male's choice woman 1 5, male's choice woman 2, male 1 choice female 9, male 1 choice female 1 5, and so on ....

  8 5 8 9 7 7 6 6  

I have another array for such women, where they are at the rate of men Evaluate.

Then create another 2D array where I score for each woman (i, j) and man (i, j)

How can I find out which combination Gives the biggest score? I would like to come up with something like this

is the best combination: male0 - & gt; Female 2 male 1 - & gt; Female 0 Male 2 - & gt; Female 1

In a way, every permutation of a female array is to be tried, each Select the total score to find the permutation, and finally the permutation, which gives the highest order.


Comments