Could someone help formulate a LINQ query for the following problem.
I have the following list of Key-Value number sets (mind that Duplicate Keys are allowed). There are thousands of such sets.
{4,3}, {4,1}, {4,8}, {4,9}, {2,3}, {4,9}, {3,1} , {3,4}
What data structure would suit me best.
Also, I want to group the above list of key-pairs, and OrderByDescending() so that i can extract the highest Key-Value pair of a Key-group.
For example in the above case, expected output:
{4,9}, {4,9}, {4, 8}, {4, 3}, {4, 1}, {2, 3}, {3, 4}, {3, 1}
Thanks
Try
or