Write the following method that merges two sorted lists into a new sorted list.public static int[] merge(int[]

Question:

Write the following method that merges two sorted lists into a new sorted list.public static int[] merge(int[] list1,?int[] list2)Implement the method in a way that takes at most list1.length + list2. length comparisons. Write a test program that prompts the user to enter two sorted lists and displays the merged list. Here is a sample run. Note that the first number in the input indicates the number of the elements in the list. This number is not part of the list.image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: