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 are the scenarios in which an element can be inserted into the circular queue?

1400


What is time complexity of binary search?

888


What is difference between treeset hashset linkedhashset?

910


What are linear and non linear data structures?

850


When would you use a tuple?

847


What is raid (redundant array of inexpensive disks)? Explain its level?

909


What is dynamic data structure?

1388


What are the different types of data type?

936


Does concat mutate array?

908


Explain about map and their types?

1004


What is a string array?

908


What is binary tree in computer science?

905


Is there any difference between int[] a and int a[]?

1151


What do you mean by general trees?

1006


Explain the term tail recursion?

994