You are viewing a single comment's thread. Return to all comments →
C# (as usually short - 1 line - and elegant, no indexing):
public static string bobAndBen(List<List<int>> trees) { return trees.Aggregate(0,(xor,t)=>xor^(t[0]==0 || t[0]==2 ? 0 : (t[0]-1)%2+1))==0 ? "BEN" : "BOB"; }
Python must be 1-ne as well........
Seems like cookies are disabled on this browser, please enable them to open this website
Bob and Ben
You are viewing a single comment's thread. Return to all comments →
C# (as usually short - 1 line - and elegant, no indexing):
Python must be 1-ne as well........