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

What are the two traversal strategies used in traversing a graph?

958


Explain what are the notations used in evaluation of arithmetic expressions using prefix and postfix forms?

1050


How do you find the complexity of a selection sort?

905


Can you override methods of arraylist?

989


How can I study data structures and algorithms?

962


What is unhashable type list?

846


Name few concurrent collection classes?

912


How do you find the height of a binary tree?

891


How to traverse data in a linked list in forward and backward direction, write the algorithm?

917


Does linkedhashset allow null values?

996


Explain the expression trees?

997


Can we declare array size as a negative number?

1003


Define in brief an array. What are the types of array operations?

1208


If you are given a choice to use either arraylist and linkedlist, which one would you use and why?

988


Define an algorithm. What are the types of algorithms?

1018