Homework: Looking for better strategy, or approach rather than complete code.
I\'v got two arrayLists of integers under two conditions:
A few comments:
addAll and subList)List numbers = Arrays.asList(10, 20, 30, 40); - note that it creates a fixed-size list so you can't add or removeList listSmall, listBig; if (list1.size() < list2.size()) { listSmall = list1; listBig = list2; } else { /* the opposite */} - then you know that listSmall is the small one and you only need one loop.