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
Why do we need sorting algorithms?
What is subtree?
Is hashmap part of collection?
What do you mean by separate chaining?
What is difference between data type and variable?
Explain the term base case?
Is char array null terminated?
Define dynamic data structures?
Does arraylist extend list?
What is the use of tree data structure?
What is the Difference between treemap and hashmap?
What is data type in data structure?
Which algorithm is used in arrays sort?
Which is faster binary or linear search?
Which is faster array or linked list?