create an singly linked lists and reverse the lists by
interchanging the links and not the data?
Answer Posted / vijayan
struct node{
int data;
node * next;
};
node *pt1,*pt2=NULL:
while(root!=NULL)
{
pt1=root;
root=root->next;
pt1->next=pt2;
pt2=pt1;
}
| Is This Answer Correct ? | 31 Yes | 3 No |
Post New Answer View All Answers
What is the slowest sorting algorithm?
How to find the missing element in integer array of 1 to 7?
Define an algorithm.
What is the difference between a hashmap and hashtable?
What is the application of queue?
Does concat mutate array?
Explain what are the methods available in storing sequential files ?
What is difference between an Array and ArrayList?
What are the disadvantages of representing a stack or queue by a linked list?
Have you ever used HashTable and Directory?
What is basic data structure?
When would you use a hashmap?
Is an arraylist a vector?
What is difference between while and do while?
What is ds heap sort?