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

Memory is not a constraint. In a single iteration(NOTE: you
can't go back), how will you find out the 10th last
node/item in a linked list.

Answer Posted / mayank pathak

Maintain a queue with ten elements. As u encounter a new
element in the linked list dequeue one element and enqueue
this new element. When the link list is fully scanned the
first element of the queue would be the 10th last element.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is one dimensional array in c++?

1114


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

2390


What is the operator in c++?

1135


program explaining feautures of c++

2442


What is difference between malloc()/free() and new/delete?

1171


What are the characteristics of friend functions?

1020


What is the difference between method overloading and method overriding in c++?

1152


What is the best way to declare and define global variables?

1335


Why is c++ called oops?

1180


What is class invariant in c++?

1235


What are guid? Why does com need guids?

1055


What are arithmetic operators?

998


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

1186


What are the uses of static class data?

1187


How to get the current position of the file pointer?

1049