I need one liner (or close to it) that verifies that given array of 9 elements doesn\'t contain repeating numbers 1,2,3,...,9. Repeating zeroes do not count (they represent empt
The following is simple and fast.
if a.Select(i => Math.Pow(2, i - 1)).ToArray().Sum()==511 ...