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 is the difference between a declaration and a definition?

1172


Explain virtual class?

1082


What is the difference between c++ and turbo c++?

1302


Is c++ slower than c?

1111


Does dev c++ support c++ 11?

1090


What do you mean by public protected and private in c++?

1114


Which one is a preferred language C or C++? Why?

1144


What are the advantages of inheritance in c++?

1141


Is c# written in c++?

1032


Are iterators pointers?

1208


What is the keyword auto for?

1089


What are the 2 main types of data structures?

1170


Can c++ be faster than c?

1079


How can you specify a class in C++?

1335


Explain about Garbage Collector?

1165