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

Are vectors passed by reference c++?

980


What is c++ similar to?

1184


What's the order in which the local objects are destructed?

1260


Does improper inheritance have a potential to wreck a project?

1138


What is the difference between while and do while loop?

1152


How a new operator differs from the operator new?

1116


Explain container class.

1235


Define Virtual function in C++.

1088


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2477


When should you use global variables?

1211


What is DlgProc?

1024


What does asterisk mean in c++?

1113


Define 'std'.

1173


What is the difference between delegation and implemented-in-terms-of?

1003


What is the difference between global variables and local variable

1057