Question: CPT-244 Assignment 4 Using the linked list methodology do the following with singly linked lists. Make sure to include comments. Using Visual Studios 2017*** The
CPT-244 Assignment 4 Using the linked list methodology do the following with singly linked lists. Make sure to include comments.
Using Visual Studios 2017***
The object of this assignment is that no matter what order you insert integers into the linked list, the list will be maintained in memory in ASCENDING ORDER with the head node referencing the lowest order member of the list.
1. Insert the following data into a singly linked list (in the order shown below, with the item numbered 1 being the first insert and so on): 1. 45 2. 49 3. 42 4. 48 5. 52 6. 12 7. 100 Make sure that the list is maintained in ASCENDING ORDER in memory as referenced above. This means when the inserts are done, the list should show the following:
head -> 12 -> 42 -> 45 -> 48 -> 49 -> 52 -> 100 -> null 2.
Print out the list using a ToString method which you have supplied for your list class.
3. Insert 49 into the list again.
4. Print out the list using the ToString method used above.
5. Remove the following items from the list (in the order indicated by the numbers below):
1. 42 2. 49 (please note at this point there should be two of these values in the list, but only remove one) 3. 100 4. 52
6. Print out the ToString method used above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
