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 to connect oracle with java ? Give detail explanation.

2032


NIC question paper

2839


how am i supposed to convert a class program in C++ to Matlab? Do i also need to make classes in matlab too or I can do it without making classes???Can somebody help....

1951


why we need embedded system

2126


how bluetooth works?what is principle behind in it?

6880


what is buffer solution?

2395


Write a program in ā€˜C’ language that will perform the following operation on static stack. 1. push 2. pop 3. Display 4. Exit Create separate functions for each operation. The push() should accept one argument of structure type and will not return any thing. The pop() function will not receive any argument & return structure type value. The stack & top must be declare as external variable. Each element of stack will contain the following information Roll No, Std Name, Course. Use do-while loop & switch case for generating the above menu. The format of the output should is given below: S.No. Roll No. Student Name Course 1 cse01 Anil Singh B.Tech

1955


explain overloaded constrator © constractor

2184


tell me the e book for data structure (basic)

2155


what is difference between server 2008R1 and 2008 server R2?

1851


Please state briefly the reasons why you think you are an outstanding candidate for this job

12856


in b+ trees, all the data is stored in leaf nodes. if all leaf nodes are crashed then how to get/recovery the data back?

2106


who is your role modal give in few sentances

2206


What is Moore's law and what limits the size of a computer chip?

1212


when load increase in generator in island mode, why turbine rpm is reduced

3591