Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Write an algorithm to reverse a link list?

ALGORITHM link list reverse write
0
Posted

Write an algorithm to reverse a link list?

0

template void linklist::reverselist() { nodeptr ptr= head; nodeptr nextptr= ptr->_next; while(nextptr) { nodeptr temp = nextptr->_next; nextptr->_next = ptr; ptr = nextptr; nextptr = temp; } head->_next = 0; head = ptr; } ————————————————————————————————-

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123