Question: Write a C++ member function for List (linked list)class called cut that accepts as parameters two positive integers representing positions between the first and last

Write a C++ member function for List (linked list)class called cut that accepts as parameters two positive integers representing positions between the first and last node of the segment of the List, inclusive. The function should delete nodes between the indicated positions. The function should do all appropriate error checking. (You may assume that the first node is at position 0)

List lst;

//lst is populated with integer values 6-> 76->1-> 45-> 16-> 98-> 62-> 55-> 12-> 1-> 555->3->NULL

// would yield lst: 6-> 76->1-> 12-> 1-> 555->3->NULL

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