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 is the parent class of abstractqueue class?
List the two important key points of depth first search?
What is stack and its operations?
Write code for reversing a linked list.
What is the best case time complexity of bubble sort?
Can binary tree have 1 child?
What are binary search and fibonacci search?
List the basic operations carried out in a linked list?
Explain what are the types of collision resolution techniques and the methods used in each of the type?
What is bubble sort with example?
Which is faster binary or linear search?
How is a hashset implemented?
Is complete binary tree?
Explain binary representation?
Who invented merge sort?