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 is the difference between public, private, and protected access?

1063


Describe the advantages of operator overloading?

1040


What are the operators in c++?

1114


What is prototype for that c string function?

1129


What is difference between n and endl in c++?

1091


What is the use of turbo c++?

1048


What is c++ map?

1154


What is c++ 11 and c++ 14?

1047


Is c++ the hardest language?

983


What is lvalue?

1169


How do you invoke a base member function from a derived class in which you have not overridden that function?

1122


what is multi-threading in C++?

1053


Show the declaration for a static function pointer.

1043


Explain the concept of dynamic allocation of memory?

1084


What is the difference between a baller and a reference in C++?

1116