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

When one must use recursion function? Mention what happens when recursion functions are declared inline?

1239


Are there any special rules about inlining?

1132


Is swift faster than go?

1141


How do pointers work?

1251


How to give an alternate name to a namespace?

1131


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

1259


What is the latest version on c++?

1184


Which is better c++ or java?

1037


What are static type checking?

1100


What is new in c++?

1154


What does #define mean in c++?

1349


If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?

1583


Explain deep copy and a shallow copy?

1119


Do the parentheses after the type name make a difference with new?

1142


What is a forward referencing and when should it be used?

1213