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

Mention the data structures which are used in graph implementation.

927


How does quick sort work?

988


Is data structures and algorithms important?

986


Explain set interface?

1172


If you do not initialize an array what will happen?

1078


Write an algorithm for inserting and deleting an element from doubly linked list?

959


What is the difference between a hashmap and hashtable?

869


Explain the term base case?

970


What is unbounded queue?

971


What is inserting in data structure?

1012


Which file contains the definition of member functions?

983


What are the applications of stack?

956


Which interfaces are implemented by concurrentskiplistset?

920


Why do we use data structures?

957


What do you understand by stable sort?

937