Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercises 1 to 8, except number 7. st::-NumberListO ListNode nodePtr = head ; while (nodePtrnullptr) nextNode = nodePtr->next; nodePtr->next = nu 11 ptr; nodePtr nextNode
Exercises 1 to 8, except number 7.
st::-NumberListO ListNode nodePtr = head ; while (nodePtrnullptr) nextNode = nodePtr->next; nodePtr->next = nu 11 ptr; nodePtr nextNode Programming Challenges 1. Your Own Linked List ist class to hold a series of integers. The class should have destructor that tions for appending, inserting, and deleting nodes. Don't forget to add a tdestroys the list. Demonstrate the class with a driver program. 2. List Print function. Teated in Programming Challenge 1 to add a print nction. The function should display al the values in the linked list. Test the Modify the linked list class you Programn cl list out. Starting with an empty list, adding some elements, then printing the resulfting 3. List Copy Constructor Modify your linked list class of Programming Challenges 1 and 2 to add a copy con- structor. Test your class by making a list, making a copy of the list, then displaying the values in the copy. 4. List Reverse Modify the linked list class you created in the previous programming challenges by adding a member function named reverse that rearranges the nodes in the list so their order is reversed. Demonstrate the function in a simple driver program. Modify the linked list class you created in the previous programming challenges to include a member function named search that returns the position of a specific value, x, in the linked list. The first node in the list is at position 0, the second node is at posi- tion 1, and so on. If x is not found on the list, the search should return -1. Test the new member function using an appropriate driver program. 5. List SearchStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started