Write the below single linked list in recursive funtion void

Write the below single linked list in recursive funtion void Queue::findRemove(int num) {if(head==NULL) {std::cout

Solution

Here is the recursive code for you:

void Queue::findRemove(int num)
{
if(head->data == num && head->next == NULL)
{
delete head;
head = NULL:
}
else if(head->data == num)
{
head = head->next;
findRemove(num);
}
}

If you need further details, please provide the Queue class.

 Write the below single linked list in recursive funtion void Queue::findRemove(int num) {if(head==NULL) {std::coutSolutionHere is the recursive code for you: v

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site