You are viewing a single comment's thread. Return to all comments →
C#:
public static int chocolateInBox(List<int> arr) { int trs = arr.Aggregate(0, (xor, cur) => xor ^ cur); return arr.Where(a=>a > 0 && (a ^ trs) < a).Count(); }
...actually 2 lines
Seems like cookies are disabled on this browser, please enable them to open this website
Chocolate in Box
You are viewing a single comment's thread. Return to all comments →
C#:
...actually 2 lines