Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is bubble sort?

850


Run time memory allocation is known as ?

950


State the demerits of linked representation of binary trees?

887


Define a priority queue?

1054


How do you sort an arraylist?

836


Parenthesis is never required in postfix or prefix expressions, why?

854


What is the difference between arrays sort and collections sort?

748


Where will be the free node available while inserting a new node in a linked list?

888


What is difference between data type and variable?

767


Why is map not a collection?

812


What is sorted map?

852


In what areas do data structures are applied?

898


in tree construction which is the suitable efficient data structure? (Array, linked list, stack, queue)

1202


How to create your own data structure in java?

883


What are the pre-requisite for the collection to perform binary search?

853