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
Define leaves?
Does concat mutate array?
In an avl tree, at explain what condition the balancing is to be done?
What type of algorithm is binary search?
What is the difference between hashset and arraylist?
What is the structure of an array?
What is difference between tree and forest?
Define outdegree of a graph?
What does it mean to sort an array?
What are some of the best practices relating to the java collection framework?
Define union-by-weight?
How do I sort a hashmap key?
Explain singly linked list in short.
What is mean by merge sort?
What is sorting in math?