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
What do you mean by translation unit?
If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?
What is a manipulator in c++?
What is flush programming?
Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL
What is the disadvantage of using a macro?
What is stoi in c++?
What is const in c++?
What is function prototyping?
What are the unique features of C++.
Is java easier than c++?
Why is swift so fast?
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack
Write about all the implicit member functions of a class?