Create a class that mixes two LinkedLists of numbers. Your class should include a static method mixList

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 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”.

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

Step by Step Answer:

Related Book For  book-img-for-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: