You are viewing a single comment's thread. Return to all comments →
static int[] solve(int a0, int a1, int a2, int b0, int b1, int b2) {
int[] aScore = {a0,a1,a2}; int[] bScore = {b0,b1,b2}; int aliceScore=0, bobScore = 0; for(int i=0; i < 3; i++){ if(aScore[i] > bScore[i]){ aliceScore += 1; }else if (bScore[i] > aScore[i]){ bobScore += 1; } } int[] result = {aliceScore,bobScore}; return result; }
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
static int[] solve(int a0, int a1, int a2, int b0, int b1, int b2) {