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

Differentiate between file and structure storage structure.

1013


Explain the sorting algorithm that is most suitable to be used with single linked list?

890


Define path in a graph?

977


Which sorting technique is faster?

964


What are the applications of priority queues?

1077


What is stack push?

938


What is a weighted graph?

1076


What is binary tree and its types?

1044


Why is the isempty() member method called?

1098


What is the family trees and connection by clause?

939


Explain Stack

1076


How can we reverse the order in the treemap?

929


Where is insertion sort used?

963


Is array a collection?

968


Mention the advantages of representing stacks using linked lists than arrays?

957