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
What is difference between data type and data structure?
How is bubble sort done?
Is set sorted?
Explain what are the methods available in storing sequential files ?
Explain merge sort algorithms.
What actions are performed when a function returns?
Explain the uses of matrix with an example?
Explain the term binding time?
Define a set?
What does adt stands for?
How to print element of Array?
What is the difference between list, set and map?
Does treeset allow duplicates?
What is data type in data structure?
Which data structures are used in bfs and dfs algorithm?