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
Explain in brief a linked list.
What should I learn first data structures or algorithms?
Will arraylist maintain insertion order?
What is a stable sort?
List the data structures which are used in hierarchical data model.
Is quicksort a stable algorithm?
How do you sort an array in descending order?
Mention for which header list, you will found the last node contains the null pointer?
What are the five examples of data?
Explain what are the major data structures used in the rdbms?
What is difference between hashset and linkedhashset?
What is the space complexity of quicksort?
What is meant by ordered and sorted in collections?
What does arrays tostring do?
What is difference between data type and variable?