摘要: 给出一个任意长度的字符串,求出该字符串中出现频率最高的字符,并算出出现次数。面试的时候被问到,这么简单的题目,竟然答不上来。面试一紧张,感觉思路就不顺畅,郁闷死了。这题有两种常见解法。 public static KeyValuePair GetMaxCountChar(string resource) { IDictionary dic = new Dictionary(); foreach (char item in resource) { if (dic.Keys.Contain... 阅读全文
posted @ 2013-09-25 09:58 GY小小鸟 阅读(302) 评论(0) 推荐(0) 编辑