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 is modcount in hashmap?
How do signed and unsigned numbers affect memory?
write a program to accept name & sort them?
How does a binary search work?
Write the c program to insert a node in circular singly list at the beginning.
Why is hashset used?
What is quick sort example?
Describe linear probing with an example.
Mention the steps to insert data at the starting of a singly linked list?
What is definition list?
Can you sort a hashmap?
What is the application of queue?
write an algorithm to show the procedure of insertion into a b-tree?
What are the difference between a stack and a queue?
Calculate the address of a random element present in a 2d array, given base address as ba.