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 do you mean by back edge?
Can you store different types in an array?
What are the types of map?
Define an abstract data type (adt)?
What are priority queues?
Define balance factor of a node in avl tree?
What is ascending and descending order?
What are the tasks performed during preorder traversal?
What is data structure and why it is important?
What is an example of an array?
Define parent node?
Does map extend iterable?
Why is hashmap faster?
How do you find the index of an element in an arraylist?
Define non-linear data structures?