create an singly linked lists and reverse the lists by
interchanging the links and not the data?
Answer Posted / vaishali naidu
We can achive this using following method:
Use three pointers
First is start pointing to first node.
Second is prev pointing to second node
Third is curr pointing to third node.
a.while(start!=curr)
{
prev->next=start
start->next=NULL;
start=prev;
prev=curr;
curr=curr->next;
}
| Is This Answer Correct ? | 13 Yes | 21 No |
Post New Answer View All Answers
Write a Program for Delete an element from a doubly linked list.
What is stack explain with diagram?
What is the Insertion Sort Code?.
What is scalar data type?
How will you sort the elements of array in descending order?
Define a linear and non linear data structure.
How do I use quick sort?
What is declaring array?
What is a map programming?
What is the time complexity of selection sort?
What is doubly linked list?
How to get top two numbers from an array?
How to increase stack limit in w3wp.exe?
How efficient is binary search?
How hashmap increases its size?