If only one maximum value for example maxValue write up is very simple, will List sorted according to the value of the dictionary values, then the for loop iterates through it, from small to large, additive is greater than the maxValue words will be a dictionary before the merger into a new List, and then the maxValue reset, since this a start up, but there are two maximum words I have no idea, I ask you what method,
CodePudding user response:
If (dic) either ContainsKey (key)){
Dic [key]=dic [key] + value;
} the else
{
Dic [key]=value;
}