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