import java.util.*; public class compareTheTriplets { static List compareTriplets(List a, List b) { int alicePoint=0; int bobPoint=0; List pointList = new ArrayList<>(); for(int i=0;i<3;i++){ int aliceScore = a.get(i); int bobScore = b.get(i); if(aliceScore!=bobScore){ int temp = aliceScore>bobScore ? alicePoint++ : bobPoint++; } } pointList.add(alicePoint); pointList.add(bobPoint); return pointList; } public static void main(String[]args){ //sample test case List aliceScores = new ArrayList<>(); List bobScores = new ArrayList<>(); aliceScores.add(17); aliceScores.add(28); aliceScores.add(30); bobScores.add(99); bobScores.add(16); bobScores.add(8); List totalScores = compareTriplets(aliceScores,bobScores); for(int i = 0;i