I came across this question in an interview. The question was a logical one. I have two variables like this:
string value1 = "Demo";
string value2 = "eoDm";
Write code to find set value in value2 as the jumbled word of value1. And here is how to do it:
string value1 = "Demo";
string value2 = "eoDm";
var valueordered1 = value1.ToCharArray().OrderBy(n => n);
var valueordered2 = value2.ToCharArray().OrderBy(n => n);
Console.WriteLine( valueordered1.SequenceEqual(valueordered2));
Console.ReadLine();
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.