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

Define leaves?

963


Does concat mutate array?

864


In an avl tree, at explain what condition the balancing is to be done?

905


What type of algorithm is binary search?

792


What is the difference between hashset and arraylist?

916


What is the structure of an array?

861


What is difference between tree and forest?

845


Define outdegree of a graph?

911


What does it mean to sort an array?

874


What are some of the best practices relating to the java collection framework?

847


Define union-by-weight?

972


How do I sort a hashmap key?

821


Explain singly linked list in short.

856


What is mean by merge sort?

829


What is sorting in math?

867