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 are the collision resolution methods?
What are hash tables good for?
What is an object array?
Does treeset remove duplicates?
Which programming language is best for data structures?
What do you understand by stable sort?
What is the difference between an array and vector?
Differentiate between comparable and comparator.
What are the disadvantages of linked list?
How is heap sort implemented?
Which sorting does collections sort use?
What is sequential search?
When would you use a hashmap?
Can sets contain duplicates?
Why we use linked list?