You are viewing a single comment's thread. Return to all comments →
public static List compareTriplets(List a, List b) { int Alicescore =0; int Bobscore = 0;
for(int i =0; i<3; i++) { if(a.get(i)>b.get(i)) { Alicescore++; } else if(a.get(i)<b.get(i)) { Bobscore++; } } List<Integer> earn = new ArrayList<>(); earn.add(Alicescore); earn.add(Bobscore); return earn; }
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 →
java
public static List compareTriplets(List a, List b) { int Alicescore =0; int Bobscore = 0;