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 / bhanu yadav

reverse(node *first) //first address of first node in linked
{ node *x,*temp,*ttemp;
temp=first; //temp at first
ttemp=temp->next; //ttemp next to temp

while(temp->next!=null)
{ x=ttemp->next;
ttemp->next=temp;
temp=ttemp;
ttemp=x;
}
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data in computer science?

877


How do arrays work?

886


Can we define the size of arraylist?

870


Which sorting is best in time complexity?

897


What does adt stands for?

822


Which collection allows null values?

816


Which sorting algorithms are in place?

827


What is the difference between file structure and storage structure?

948


How to find 3rd element from end in a linked list in one pass?

826


Which data structure is applied when dealing with a recursive function?

969


Can arraylist have null values?

806


What are the advantages of linked list over an array?

887


Define a full binary tree ?

935


What are the major data structures used in the rdbms?

969


Can you sort a hashset?

866