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 / dark knight

1-TAKE TWO POINTERS
2-ITERATE 1 POINTER IN THE LIST UP TO THE 10th POSITION FROM STARTING
3-INITIALLY----2nd POINTER IS AT THE HEAD NODE .
4-NOW INCREEMENT both POINTER TO THE NEXT POTISION SUCH THAT THE
1st pointer reaches end .
5--2ND POINTER IS THE REQUIRED NODE

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 3 levels of programming languages?

1041


What are the various arithmetic operators in c++?

1118


What do nonglobal variables default to a) auto b) register c) static

1150


What is the v-ptr?

1161


Write about the various sections of the executable image?

969


What is ios in c++?

1217


What are namespaces in c++?

1089


What is the use of seekg in c++?

1052


On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?

1127


Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..

3843


What are advantages of using friend classes?

1073


Do you know what is overriding?

1198


What is c++ good for?

1060


What is microsoft c++ redistributable?

1095


Does c++ cost money?

991