摘要: 晚上看到有算法分享关于怎么在10万个手机号码中选择重复号码的问题。刚好晚上有空,也写了一个算法。View Code Dictionary<int,int>dic=newDictionary<int,int>();intcount3=0;foreach(variteminmobileArray){varhashCode=item.GetHashCode();intoutInt=0;if(dic.TryGetValue(hashCode,outoutInt)){if(outInt==1){count3++;dic[hashCode]=2;}}elsedic[hashCode 阅读全文
posted @ 2011-07-21 22:32 星际迷茫 阅读(881) 评论(4) 推荐(0) 编辑