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 does map stand for?
How do you sort an arraylist in descending order?
What is the most used data structure?
Why you need a data structure?
Which sorting is worst?
A lot of data structures related programs related to only trees and graphs, like the diameter of a tree, removing the loops in a graph etc.
Why is waste sorting important?
Where will be the free node available while inserting a new node in a linked list?
What things you would care about to improve the performance of application if its identified that its db communication that needs to be improved?
Which is the parent class of list
Is pointer a variable in data structure?
Write the procedure to convert general tree to binary tree?
What sorting algorithm should be used for sorting strings?
What is sorting problem?
What are different dynamic memory allocation technique in c.