You are viewing a single comment's thread. Return to all comments →
java solution
public static List<Integer> compareTriplets(List<Integer> a, List<Integer> b) { // determine respective comparison points int alice = 0, bob = 0; for (int i = 0; i < a.size(); i++) { alice += (a.get(i) > b.get(i)) ? 1 : 0; bob += (a.get(i) < b.get(i)) ? 1 : 0; } List<Integer> scores = new ArrayList<>(Arrays.asList(alice, bob)); return scores; }
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 solution