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 / sanjay rajput

struct node
{
int val;
struct node *next;
};

typedef struct node NODE;
NODE *p,*start;
p=start->next;
while(p!=NULL)
{
p->next=start;
start=p;
p=p->next;
}

Is This Answer Correct ?    1 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the slowest sorting algorithm?

853


How to search binary in a sorted array?

799


For addition and deletion. Which one is most preferred: array list or linked list?

848


Which searching algorithm is best?

838


Which data structure is used in arraylist?

931


How do you use the sort function?

799


Can a tree be empty?

815


What is a node in it?

883


Which interfaces are implemented by abstractsequentiallist?

834


How would you use bsearch() function to search a name stored in array of pointers to string?

803


What is data structures in computer science?

873


Is array faster than arraylist?

910


What is difference between hashmap and map?

985


Are data structures important?

884


What is the easiest sorting method to use in data structures?

1016