create an singly linked lists and reverse the lists by
interchanging the links and not the data?
Answer Posted / vimesh
struct node
{
int data;
node *link;
};
node *p=NULL;
void reverse(*x)
{
node *r,*s,*q;
r=NULL;
q=x
while(q->link!=NULL)
{
s=r;
r=q;
q=q->link;
r->link=s;
}
x=r;
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Differentiate between file and structure storage structure.
Explain the sorting algorithm that is most suitable to be used with single linked list?
Define path in a graph?
Which sorting technique is faster?
What are the applications of priority queues?
What is stack push?
What is a weighted graph?
What is binary tree and its types?
Why is the isempty() member method called?
What is the family trees and connection by clause?
Explain Stack
How can we reverse the order in the treemap?
Where is insertion sort used?
Is array a collection?
Mention the advantages of representing stacks using linked lists than arrays?