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

Explain the benefits of proper inheritance.

1081


what is the difference between overloading & overriding? give example.

1098


What are the two shift operators and what are their functions?

1029


Can you please explain the difference between using macro and inline functions?

989


Why can templates only be implemented in the header file?

1054


Why do we use iterators?

1010


What is setbase c++?

1049


Is arr and &arr are same expression for an array?

998


How to get the current position of the file pointer?

971


Why do we need runtime polymorphism in c++?

970


What is difference between c++ and c ++ 14?

982


Write a program to add three numbers in C++ utilizing classes.

1054


Can we sort map in c++?

962


What are the uses of static class data?

1116


What is the best c++ book for beginners?

1087