Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program to implement an ordered list using a linkedlist. The program sho

ID: 3611720 • Letter: W

Question

Write a program to implement an ordered list using a linkedlist. The program should be able to insert and deleteelements from the ordered list. Elements of the ordered listconsist of integers. Input to the program consists of anarbitrary list of integers.

The program should read each integer one at a time. If thenumber is not in the list, it should be added to the list in itsproper position (that is, numerical order). If the integer isalready in the list, it should be deleted from the list. The listshould be printed after each insertion or deletion. Programshould continue until the user inputs -999.

Example:

           Input                          Ordered list (output)

           3                                 3

           6                                 3   6

           1                                 1   3   6

           7                                 1   3   6   7

           2                                 1   2   3   6   7

           3                                 1   2   6   7

           6                                 1   2   7

           1                                 2   7

           9                                 2   7   9

           -999

Explanation / Answer

Write a program to implement an ordered list using a linkedlist. The program sho

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote