Skip to content

Instantly share code, notes, and snippets.



Created Oct 7, 2017
What would you like to do?
Sung's implementation
public static int Stray(int[] numbers)
return numbers
.GroupBy(n => n)
.Select(g => new { Key = g.Key, Count = g.Count() })
.Where(o => o.Count % 2 == 1).FirstOrDefault().Key;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.