example.AddRange(example);
example.ToList().Distinct();
example.Union(lastSameExample).ToList();
//时间监视方法
Dictionary<string, double> timeDictionary1 = new Dictionary<string, double>();
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
example.AddRange(example);
example.ToList().Distinct();
stopwatch.Stop();
//获取时间(ms)
timeDictionary1.Add("SameList",stopwatch.Elapsed.TotalMilliseconds);
取26个字母放入字符串列表:
完全不相同、第一个相同、最后一个相同、中间的相同
List<string> example = new List<string>()
{
"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"
};
List<string> notSameExample = new List<string>()
{
"a","bb","cc","dd","ee","ff","gg","hh","ii","jj","kk","ll","mm","nn","oo","pp","qq","rr","ss","tt","uu","vv","ww","xx","yy","zz"
};
List<