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...

Write a nonrecursive routine to reverse a singly linked
list in O(N) time.

Answer Posted / sandeep

node * reverse(node * list)
{
node *p, *q, *r;
p = list;
q = p->next;
while(q->next != NULL)
{
q = p->next;
r = q->next;
p->next = r;
q->next = p;
p = p->next;
}
q->next = p;
p->next = NULL;
return q`;
}

Is This Answer Correct ?    26 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many VLANs are supported on a single switch

1894


can i knw what are we supposed to read for the coming oces/dgfs 2009 exam?what kind of book are we supposed to study?

2035


Sketch a velocity time graph for a skydiver jumping out of a plane.

1243


what are basic step involved in embedded system software development?

3062


sir i have 4 year gap in engineering. i would complete my degree b.tech it in 2014. it will be may be in 2nd class.my hsc is also with 2nd class. i am week in programming. Then if i want highest package upto 5-6 lacs then what should i prepare myself as a good engineer to get this package???

1825


Is there aptitute question will be asked in NIC exam ??? If yes how many questions will be asked??

2251


can anybody send me the technical papers of hewitt associates pls...I cleared aps n GD n has only less time for technical round?

2198


what is the need of constractor explain with sutable progarmming example

2041


pls send me rrb se(s&t)questions

2242


i want questions only on code part like general logics in c and java

1833


Please if anybody have Vizag Steel Entrance exam papers or atleast Pattern of exam.Then please forward to my email- id: :srikanth.avanthi@gmail.com

1964


project plan for bug tracking system?

2046


376,188,88,40,16,4,-2. Find wrong term in series

4356


Briefly describe your ideal job?

3782


how to initialize a pointer to an array?

2389