Create a function for the queue headers that removes a consecutive list of items. The function will accept 2 parameters, where the first parameter is a value in the list and the second parameter is a whole number. The function will search for the firs parameter, and if the value is in it will remove the items following the searched value nth times. Use the following example: Example 1: the list has 10 items namely a, s, c, v, m, b, x, p,k, i the function accepts 2 parameters v and 3. The resulting link will be a, s, c, x, p,k, I Example 2: the list has 10 items namely 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 the function accepts 2 parameters 6 and 4.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter17: Linked Lists
Section: Chapter Questions
Problem 18PE
icon
Related questions
Question

C++ Data Structures. Use the array based list headers for queue

Create a function for the queue headers that removes a consecutive list of items. The function will accept 2 parameters, where the first parameter is a value in the list and the second parameter is a whole number. The function will search for the first
parameter, and if the value is in the list it will remove the items following the searched value nth times. Use the following example:
Example 1:
the list has 10 items namely a, s, c, v, m, b, x, p,k, i
the function accepts 2 parameters v and 3.
The resulting link will be a, s, c, x, p,k, I
Example 2:
the list has 10 items namely 0, 9, 8, 7, 6, 5, 4, 3, 2, 1
the function accepts 2 parameters 6 and 4.
The resulting link will be 0, 9, 8, 7, 2, 1
Transcribed Image Text:Create a function for the queue headers that removes a consecutive list of items. The function will accept 2 parameters, where the first parameter is a value in the list and the second parameter is a whole number. The function will search for the first parameter, and if the value is in the list it will remove the items following the searched value nth times. Use the following example: Example 1: the list has 10 items namely a, s, c, v, m, b, x, p,k, i the function accepts 2 parameters v and 3. The resulting link will be a, s, c, x, p,k, I Example 2: the list has 10 items namely 0, 9, 8, 7, 6, 5, 4, 3, 2, 1 the function accepts 2 parameters 6 and 4. The resulting link will be 0, 9, 8, 7, 2, 1
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning