Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var res = maxRatingBigrams.Min(s => s.Key);
- var res = maxRatingBigrams.Min((x, y) => string.CompareOrdinal(x.Key, y.Key));
- SortedDictionary<string, int> dict = new SortedDictionary<string, int>();
- dict.Add("aaa", 5);
- dict.Add("bbb", 7);
- dict.Add("ccc", 8);
- dict.Add("ddd", 8);
- dict.Add("eee", 4);
- dict.Add("fff", 4);
- int max = dict.Values.Max();
- string keyMax = "";
- foreach (string key in dict.Keys)
- {
- if (dict[key] == max)
- keyMax = key;
- }
- Console.WriteLine(keyMax.ToString() + dict[keyMax]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement