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 parameter does the constructor to an ofstream object take?

1060


Differentiate between a constructor and a method in C++.

1062


Can we inherit constructor in c++?

1097


What is the best way to take screenshots of a window with c++ in windows?

1057


What is a .lib file in c++?

1000


Why is c++ so fast?

1049


What is a driver program?

1112


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

1096


Discussion on error handling of C++ .

1124


Are iterators pointers?

1164


Why do we use using namespace std in c++?

1088


How do you print a string on the printer?

1040


What are the uses of pointers?

1079


When does a name clash occur in c++?

1173


What does return 0 do in c++?

1041