static void Main(string[] args)
{
string str1 = "Silent";
string str2 = "Listen";
Console.WriteLine(areEqual(str1, str2));
Console.Read();
}
public static bool areEqual(string str1, string str2)
{
var s1 = str1.ToLower().OrderBy(x => x);
var s2 = str1.ToLower().OrderBy(x => x);
foreach (var item in s1)
{
Console.Write(item);
}
Console.WriteLine();
foreach (var item in s2)
{
Console.Write(item);
}
Console.WriteLine();
return str1.ToLower().OrderBy(x => x)==(str1.ToLower().ToList().OrderBy(x => x));
}
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE