You are viewing a single comment's thread. Return to all comments →
For C#
return string.Concat(Enumerable.Range(0, s.Length / 3) .Select(s => "SOS")) .Select((c, i) => c != s[i] ? 1 : 0) .Sum();
Seems like cookies are disabled on this browser, please enable them to open this website
Mars Exploration
You are viewing a single comment's thread. Return to all comments →
For C#
return string.Concat(Enumerable.Range(0, s.Length / 3) .Select(s => "SOS")) .Select((c, i) => c != s[i] ? 1 : 0) .Sum();