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
Which type of memory allocation is referred for linked list?
Explain the difference between a list and array.
List out the advantages of using a linked list?
What is harvesting in agriculture?
Explain Queue
Construct a doubly linked list using a single pointer in each node?
What is concurrentlinkeddeque?
Is hashmap ordered?
Describe avl tree or height balanced binary search tree.
List the types of tree.
What is unmodifiable list?
Tell me why might quick sort might be better than merge sort?
We know that Arrays are objects so why cannot we write strArray.length()?
What is the easiest sorting method to use in data structures?
Define 2-3-4 tree?