privatestringGetLargestNumberByList(IEnumerable<KeyValuePair<string, int>> myList) { var result = ""; foreach (var keyValuePair in myList) { result += keyValuePair.Key; } return result; }
private IEnumerable<KeyValuePair<string, int>> GetSortedList(IEnumerable<int> nums) { var dict = new Dictionary<string, int>(); foreach (var num in nums) { if (dict.ContainsKey(num.ToString())) { continue; } dict.Add(num.ToString(), num); } var result = dict.ToList(); result.Sort(mySort);