If x of y values are equivalent
c#, conditional-statements, if-statement, java, math
Solution
This should work for all cases:
bool match = array.GroupBy(n => n).Any(g => g.Count() >= 3);
Problem
If I have 5 integers (a,b,c,d,e) what is the shortest way I can check if at least 3 of them are equivalent. ex. ``` a==1 b==1 c==2 d==3 e==4 //returns false ex. a==1 b==1 c==1 d==3 e==4 //returns true ```