Problem Solving Help

Hey guys im usually good at problem solving but with this i am pretty stumped, well what i want to do is run through this code which is used to solve a sudoku.

1
2
3
4
5
6
7
8
9
10
11
int ValuesCount = 0;
		for (int i = 0; i < possibleNumberCount; i++)
			{
				for (int j = 0; j < possibleNumberCount2; j++)
				{
					if (PossibleValuesFor0[i] == PossibleValuesFor0Number2[j])
					{
						break;
					}
				}
			}


the possibleNumberCount and possibleNumberCount2 both = 4.
Well i have these values in the array PossibleValuesFor0 (4,5,8,9) and in the second array PossibleValuesFor0Number2 (2,4,8,9)

Right sorry if this doesnt sound correct but what i want to do is run through these loops with the main priority of only wanting to keep the number that has not been repeated in the second array compared to the first array for example this time it will be 5!

I want to save this 5 to an array only once can anyone help?
Bump
Help
@bjcool4

Actually, I believe you would wind up with 2 and 5. The 5 in PossibleValuesFor0 array and the 2 in the PossibleValuesFor0Number2 array. Anyway, after running this, just check for numbers above 0 in the array you're interested in.
1
2
3
4
5
6
7
8
9
10
11
12
int ValuesCount = 0;
	for (int i = 0; i < possibleNumberCount; i++)
		{
 		    for (int j = 0; j < possibleNumberCount2; j++)
			{
				if (PossibleValuesFor0[i] == PossibleValuesFor0Number2[j])
				{
					PossibleValuesFor0[i]=0
                                        PossibleValuesFor0Number2[j]=0;
                                }
			}
		}


Not sure how this helps in your sudoku program, but I hope it does.
Topic archived. No new replies allowed.