//字符串去除重复
private static string StringEliminateDuplicate(string str)
{
var strArray = str.Distinct().ToArray(); //字符去重
return string.Join(string.Empty, strArray); //字符成串
}
相关应用:LeetCode500. 键盘行
//字符串去除重复
private static string StringEliminateDuplicate(string str)
{
var strArray = str.Distinct().ToArray(); //字符去重
return string.Join(string.Empty, strArray); //字符成串
}
相关应用:LeetCode500. 键盘行