Assume that a singly linked list is implemented with a header node, but no tail
ID: 3885248 • Letter: A
Question
Explanation / Answer
Hi, As per chegg policy we are supposed to answer only one question, please post other 2 as separate questions, hope you understand.
2.
to get size
int getSize(node* p)
{ int count=0;
}
b. print
void print(node* p)
{
}
c. search for a value
int search(node* p,int d)
{ int flag=0;
}
d.add a value
node* add(node* p,int d)
{ int count=0;
}
e.delete
node* delete( node * p,int d ) {
while(p!=null)
{
p->nextptr = q ;
}
}
return p;
}
Thumbs up if this was helpful, otherwise let me know in comments.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.