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 / vijayan

struct node{
int data;
node * next;
};
node *pt1,*pt2=NULL:
while(root!=NULL)
{
pt1=root;
root=root->next;
pt1->next=pt2;
pt2=pt1;
}

Is This Answer Correct ?    31 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain in brief a linked list.

1004


What should I learn first data structures or algorithms?

1057


Will arraylist maintain insertion order?

961


What is a stable sort?

913


List the data structures which are used in hierarchical data model.

1002


Is quicksort a stable algorithm?

1012


How do you sort an array in descending order?

918


Mention for which header list, you will found the last node contains the null pointer?

892


What are the five examples of data?

1026


Explain what are the major data structures used in the rdbms?

1000


What is difference between hashset and linkedhashset?

1153


What is the space complexity of quicksort?

954


What is meant by ordered and sorted in collections?

941


What does arrays tostring do?

933


What is difference between data type and variable?

849