Question: In Java plz Create a file called PairwiseMax.java. Write a function ArrayList elementMax (Arraylist a, Arraylist b) that takes two lists of ints, a and
In Java plz

Create a file called PairwiseMax.java. Write a function ArrayList elementMax (Arraylist a, Arraylist b) that takes two lists of ints, a and b, and calculates the pairwise maximum of a and b. That is, each element of the result is the greater of the corresponding element at the same index in a and b, or the element in the longer list if there is no corresponding element in the other list. That is: - The first element of the result is the greater of the first element in a and the first element in b - The second element of the result is the greater of the second element in a and the second element in b - and so on. - a and b can be of different lengths. Hence, if there is an element in a list with no corresponding element in the other list, then the result is the element in the longer list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
