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 is modcount in hashmap?

833


How do signed and unsigned numbers affect memory?

844


write a program to accept name & sort them?

864


How does a binary search work?

817


Write the c program to insert a node in circular singly list at the beginning.

857


Why is hashset used?

893


What is quick sort example?

822


Describe linear probing with an example.

935


Mention the steps to insert data at the starting of a singly linked list?

936


What is definition list?

894


Can you sort a hashmap?

802


What is the application of queue?

858


write an algorithm to show the procedure of insertion into a b-tree?

876


What are the difference between a stack and a queue?

915


Calculate the address of a random element present in a 2d array, given base address as ba.

1461