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

Have two pointers p1 and p2.p1 points to the first node in the linked list.p2 to the tenth node.Now move both the pointer togther till p2->link = NULL.P1 is pointing to the 10th node from the last

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ios class in c++?

1178


What is an adjust field format flag?

1184


What is extern c++?

1060


What are the advantages of using a pointer?

1127


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

1145


What is auto used for in c++?

1110


What is the type of this pointer in c++?

1113


Explain the static member function.

1229


give me an example for testing a program showing the test path .show how the test is important and complex.

2996


What is meant by forward referencing and when should it be used?

1073


Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?

1131


What are punctuators in c++?

1213


What does new do in c++?

1128


Why isn't sizeof for a struct equal to the sum of sizeof of each member?

1059


How do you differentiate between overloading the prefix and postfix increments?

1140