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 / vaishali naidu

We can achive this using following method:
Use three pointers
First is start pointing to first node.
Second is prev pointing to second node
Third is curr pointing to third node.
a.while(start!=curr)
{
prev->next=start
start->next=NULL;
start=prev;
prev=curr;
curr=curr->next;
}

Is This Answer Correct ?    13 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between hashmap and hashtable?

1016


How can you insert a node at the end of linked list?

924


What is the difference between a hashmap and hashtable?

869


What is a matrix?

1170


What is a spanning tree?does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?

954


What are the different types of data type?

998


What is time complexity of sorting algorithms?

981


What are skew trees? For a tree with 4 nodes draw all possible binary? Generalize for n nodes how many binary trees can be drawn?

1075


What is difference between hashtable and hashmap?

1123


Write the procedure to convert general tree to binary tree?

1107


Which sorting does collections sort use?

950


What do u mean by data type?

928


Explain binary search tree?

998


Explain what is the bucket size, when the overlapping and collision occur at same time?

1067


Which sorting is stable?

952