Write a program to reverse a linked list?

Answer Posted / jithin

reverse(Node * previous, Node * Current)
{
start = current;
if(current !=null)
{
reverse(current, current->next);
current->next = previous;
}

}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is recursion?

1339


Describe the advantage of an external iterator.

839


Which function cannot be overloaded c++?

860


Is it possible to have a recursive inline function in c++?

816


What is a container class? What are the types of container classes in c++?

915


What does new do in c++?

851


What is difference between class and structure in c++?

913


What is c++ programming language?

862


How much do c++ programmers make?

815


What are the advantages of using friend classes?

916


Can I learn c++ without knowing c?

836


Do you know what are pure virtual functions?

924


List the advantages of inheritance.

912


What is c++ hash?

888


What is the auto keyword good for in c++?

893