You are viewing a single comment's thread. Return to all comments →
Thanks, at first I wondered how this CustomComparer could beat my initial lambda expression which was failing at TC #7:
Array.Sort(unsorted, (x, y) => (x.Length == y.Length ? string.Compare(x, y) : x.Length - y.Length));
And soon realized that I should have used string.CompareOrdinal(). Now the lambda expression works for TC #7.
Seems like cookies are disabled on this browser, please enable them to open this website
Big Sorting
You are viewing a single comment's thread. Return to all comments →
Thanks, at first I wondered how this CustomComparer could beat my initial lambda expression which was failing at TC #7:
And soon realized that I should have used string.CompareOrdinal(). Now the lambda expression works for TC #7.