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

Write a Program for Delete an element from a doubly linked list.

845


What is stack explain with diagram?

859


What is the Insertion Sort Code?.

978


What is scalar data type?

955


How will you sort the elements of array in descending order?

900


Define a linear and non linear data structure.

914


How do I use quick sort?

802


What is declaring array?

835


What is a map programming?

874


What is the time complexity of selection sort?

790


What is doubly linked list?

859


How to get top two numbers from an array?

1022


How to increase stack limit in w3wp.exe?

1008


How efficient is binary search?

822


How hashmap increases its size?

955