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 the difference between Array and Array List ? Explain in brief with example.
Draw the B-tree of order 3 created by inserting the following data arriving in sequence – 92 24 6 7 11 8 22 4 5 16 19 20 78
Why hashtable is faster than arraylist?
What is harvesting in agriculture?
How do you do a heap sort?
Which is faster array or arraylist?
Differentiate file structure from storage structure?
Which is the fastest sorting?
What is sorting problem?
Does hashset maintain order?
Explain the uses of binary tree.
How many types of linked list exist?
How does hashset work internally in java?
How does threaded binary tree represented in data structure?
What are the goals of data structure?