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
Write an algorithm to check if there is a loop in a doubly linked list.
Is bubble sort slow?
What are the types of map?
What happens if an array goes out-of-bounds?
How can I search for data in a linked list?
What is heap tree explain with example?
How helpful is abstract data type of data structures?
Why quicksort is better than merge sort?
What is the purpose of tochararray ()?
What do you mean by disjoint set adt?
Which sorting has less time complexity?
write an algorithm to show the procedure of insertion into a b-tree?
What is sorting explain?
Define depth and height of a tree?
What is a circular singly linked list?