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 immutablelist?

853


Is it possible to insert different type of elements in a stack? How?

855


Why merge sort is better than insertion sort?

778


What is default array size?

956


What is the best complexity of bubble sort?

849


What is a data structure node class?

967


Does treemap allow null keys?

875


How do you empty an arraylist?

908


What is sorting and classifying?

835


What is the quickest sorting algorithm?

890


How do you get placements?

794


State the rules to be followed during infix to prefix conversions?

998


List the area of applications of data structure.

1149


Which is faster array or linked list?

838


Is radix sort stable?

858