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
How do you sort large data?
What do you mean by hash table?
How does a hashmap work?
do records fall under linear or non linear data structures?
Why is tuple immutable?
List out the applications of a linked list?
How many types of linked list exist?
List out the advantages of using a linked list?
What are trees in data structures?
Define general trees?
What is the best data structure and algorithm to implement cache?
Which is faster hashmap or treemap?
Can tuple be sorted?
Does arraylist extend list?
Is array part of collection framework?