create an singly linked lists and reverse the lists by
interchanging the links and not the data?
Answer Posted / mayur bagal
struct node{
int data;
node * next;
};
node *pt2=NULL:
while(root!=NULL)
{
node * temp = root->next;
root->next= pt2;
pt2=root;
root = temp;
}
Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is doubly linked list in data structure?
What do you mean by separate chaining?
Treemap orders the elements on which field?
How do I sort hashset?
Can arraylist hold duplicates?
Are duplicates allowed in hashmap?
Which sorting algorithm is used in arrays sort?
Name some applications which use linked lists.
Explain extended binary tree.
Why do we use collections?
How to use appendNode() in linkedlist()?
Construct a doubly linked list using a single pointer in each node?
Define indegree of a graph?
What is array sort?
What’s the difference between enumeration and iterator interfaces?