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 / hasan ali mirza

list reverse(list L)
{
stack S;
position Lpos = first(L);
while(Lpos->element != NULL)
{
push(Lpos->element, S);
Lpos = Lpos->next;
}
makeEmpty(L);
Lpos = first(L);
while(isempty(S) == FALSE)
{
insert(pop(S), Lpos);
Lpos = Lpos->next;
}
return L;
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

is the used fire extinguisher fall under Hazardous waste material?

1917


Explain the following program segment. f(){ int *b; *b=2; }

2445


why one should join accenture?

2961


WHAT HAPPEN WHEN ANY SPINDLE RUN OVER 10 MM HEIGHT ABOVE BOLSTAR IN RING SPINNING FRAME

1841


plz send me interview questions & answers of Data Structure

2055


A rectangular sheet dimensions a x b is to be made into an open-topped box by cutting a square of side h from each corner and folding the 4 sides up. Find the value of h which allows the maximum volume of the box?

1221


What is necking in production engineering ?

1015


What is the difference between CD-R and CD+R?

2225


Sir, I was recently placed at ITC Infotect. My ctc is 2.46lpa. How much will I get in hand every month? Plssss answer. Thanx in advance.

2610


describe about storage allocation and scope of global,exterm,static,local and register variables in c language?

2323


C++ PROGRAM FOR FIBONACCI SERIES USING COPY CONSTRUCTER

5317


write a c program which accept input as:Anu.B.Kapur and give out as:Kapur.A.B using pointers

1773


Q1 Design a webpage for a hotel which displays all the information of the hotel such as rooms available, facilities, and packages along with rate list. Apply the different tags available to give it a good style.

1717


can i learn ad. java without learned core java? java is best or .net is best for summer training?

1964


Is Diesel staorage tank ( 800 litres) cleaning procedure is available with any body

2009