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 / mayur bagal

struct node{
int data;
node * next;
};

node *pt2=NULL:
while(root!=NULL)
{
node * temp = root->next;
root->next= pt2;
pt2=root;
root = temp;
}

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does map stand for?

988


How do you sort an arraylist in descending order?

796


What is the most used data structure?

910


Why you need a data structure?

1085


Which sorting is worst?

996


A lot of data structures related programs related to only trees and graphs, like the diameter of a tree, removing the loops in a graph etc.

1034


Why is waste sorting important?

975


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

924


What things you would care about to improve the performance of application if its identified that its db communication that needs to be improved?

931


Which is the parent class of list class?

905


Is pointer a variable in data structure?

1279


Write the procedure to convert general tree to binary tree?

1062


What sorting algorithm should be used for sorting strings?

936


What is sorting problem?

892


What are different dynamic memory allocation technique in c.

937