Question: Use the IntLinkedList class ( library ) and create a test class. Utilize a loop to add all numbers between 0 and 2 0 (

Use the IntLinkedList class (library) and create a test class. Utilize a loop to add all numbers
between 0 and 20(inclusive) to it, with even numbers being added to the front and odd numbers
being added to the back. Then, use the toString() method to print it out.
Next, using a loop, remove elements from the front of the list until the element that was removed
was 0, then print it out again.
Expected Output:
LinkedList (size=21): 20,18,16,14,12,10,8,6,4,2,0,1,3,5,7,9,11,13,15,17,19
LinkedList (size=10): 1,3,5,7,9,11,13,15,17,19
Use the IntLinkedList class ( library ) and

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 Programming Questions!