Question: Given three linked lists with any type E, combine it to form a new linked list such that the new list contains the elements in

 Given three linked lists with any type E, combine it to

Given three linked lists with any type E, combine it to form a new linked list such that the new list contains the elements in the order of (1st element from list1, 1st element from list2, 1st element from list 3, 2nd element from list1, 2nd element from list2, 2nd element from list3, ...) etc. The three lists can be of different sizes including possibly being empty. This is similar to the one we worked on with two lists in class. public LinkedList alternate ThreeLists (LinkedListlistl, LinkedListlist2, LinkedListlist3) { } Write a main (..) method to test the code you wrote by using Integer values in the lists. Both methods (the main() and alternateThree Lists(..)) must be part of a Java class file that you will submit

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!