We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int alice = 0;
int bob = 0;
List score = new LinkedList();
for (int i = 0; i < 3; i++) {
if(a.get(i)==b.get(i))
continue;
if(a.get(i) > b.get(i))
alice++;
else
bob++;
}
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
hey, ur code was nice,i did a lil modification...
int alice = 0; int bob = 0; List score = new LinkedList(); for (int i = 0; i < 3; i++) { if(a.get(i)==b.get(i)) continue; if(a.get(i) > b.get(i)) alice++; else bob++; }