import java.util.ArrayList; public class TRAI_25_X2_skeleton implements TRAI_25_X2 { // ^^^^^ // own userid here /** * SELF-EVALUATION HERE: * * * */ /** * Difference of two lists that are in ascending order. * * Returns a new list that contains all the elements that are in list A and in list B, * If an element is in A and B several times, it will be in the result list as many times * as in the list that has fewer occurences. * Result list will be in ascending order. * If either of the lists is not in ascending order, result can be anything. * @param A first input list, elements in ascending order * @param B second input list, elements in ascending order * @return intersection list, elements in ascending order */ public ArrayList intersectionOfGrowingLists(ArrayList A, ArrayList B) { ArrayList result = new ArrayList<>(); // TODO // make a careful plan _before_ you write anything here // then transfer the plan to working code // use the fact that the lists are in ascending order _aready_ in the plan! return result; } }