Question: Really need help, thanks! c. Method intersect: accepts two sorted array lists of integers as parameters and returns a new list that contains only the

Really need help, thanks!

c. Method intersect: accepts two sorted array lists of integers as parameters and returns a new list that contains only the elements that are found in both lists. For example, if lists named list1and list2 initially store: [1, 4, 8, 9, 11, 15, 17, 28, 41, 59] [4, 7, 11, 17, 19, 20, 23, 28, 37, 59, 81]

Then the call of intersect(list1, list2) returns the list:[4, 11, 17, 28, 59] ]

Print the list that is returned by this method.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!