Question: Create a class that mixes two LinkedLists of numbers. Your class should include a static method mixList that takes the references of two LinkedLists as
Create a class that mixes two LinkedLists of numbers. Your class should include a static method mixList that takes the references of two LinkedLists as arguments and inserts the numbers in the second list into the first list at alternate positions. For example, if the first list has “3,1,7,4” and the second list has “5,6,0,8”, then the first list should become “3, 5, 1, 6, 7, 0, 4, 8”.
Step by Step Solution
3.34 Rating (148 Votes )
There are 3 Steps involved in it
You can create a class named ListMixer with a static method mixList that takes two linked lists as a... View full answer
Get step-by-step solutions from verified subject matter experts
