Here is the coding.
List
L.Reverse();
L.Sort(delegate(KeyValuePair
{ return rhs.Value.CompareTo(lhs.Value); });
foreach (KeyValuePair
{
show3 += val.Key+"\r\n";
}
MessageBox.Show(show3.ToString());
List
foreach (KeyValuePair
{
show4 += pair.Key+"\r\n";
}
MessageBox.Show(show4.ToString());
VulpesPosted Mar 30, 2011, 11:03 AM
Sin YeePosted Mar 30, 2011, 10:15 AM
Sin YeePosted Mar 30, 2011, 9:59 AM
VulpesPosted Mar 30, 2011, 9:55 AM
Also, is it acceptable to produce an intersection of digits as I've illustrated above?
Sin YeePosted Mar 30, 2011, 9:51 AM
VulpesPosted Mar 30, 2011, 9:45 AM
The intersection would be:
2
(empty)
(empty)
4
The union would be:
2 1 2
1 2 3 4
3 2 5
4 3 4
and the union without duplicates would be:
2 1
1 2 3 4
3 2 5
4 3
Also I still don't see any sign of KeyValuePairs here??
Sin YeePosted Mar 30, 2011, 9:15 AM
eg.
2 1
2 3 4
2 5
3 4
like this....
VulpesPosted Mar 30, 2011, 9:09 AM
The elements of the first list are all single digits.
The elements of the second list are either two or three digits.
Also I don't see any evidence of KeyValuePairs?
What output are you expecting to get?
Sin YeePosted Mar 30, 2011, 8:59 AM
2
1
3
4
5
the List 2 output is like this
1 2
2 3 4
2 5
3 4 .... so, are these two List can intersect together..???
VulpesPosted Mar 30, 2011, 8:34 AM
If there's no output, then the two lists can't have any KeyValuePairs in common.
Check what happens if you use the Union rather than the Intersect method.
Sin YeePosted Mar 30, 2011, 8:27 AM
VulpesPosted Mar 30, 2011, 6:55 AM