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 / ravindra

simple,

in case the list has say 90 elements, then for every 10
elements, he is writing to the array. though the array size
is 10, this is done by saying pos%10.
thus when the list is iterated he just substracts 10 from
the pos and then does %10 since he has to factor in, that
array starts from 0 and not from 1 :)

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are punctuators in c++?

1177


How does a C++ structure differ from a C++ class?

1140


What is the use of ::(scope resolution operator)?

1083


What is the last index number in an array of 100 characters a) 100 b) 99 c) 101

1161


How can you tell what shell you are running on unix system?

1130


What will happen if a pointer is deleted twice?

1200


Explain about Virtual Function in C++?

1037


Write a function that swaps the values of two integers, using int* as the argument type?

1043


Mention the purpose of istream class?

1123


Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.

3027


Is eclipse good for c++?

1061


When can I use a forward declaration?

1115


What is the latest c++ standard?

1160


What is an overflow error?

1114


What is a map in c++?

1225