You are viewing a single comment's thread. Return to all comments →
In java public static List compareTriplets(List a, List b) { List result=new ArrayList(); int size_A=a.size();
int alice=0; int bob=0; for(int i=0;i<size_A;i++){ if(a.get(i)>b.get(i)){ alice++; } else if(a.get(i)<b.get(i)){ bob++; } else if(a.get(i)==b.get(i)){ continue; } } result.add(alice); result.add(bob); 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 →
In java public static List compareTriplets(List a, List b) { List result=new ArrayList(); int size_A=a.size();
}