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 enum c++?

1243


What can I safely assume about the initial values of variables which are not explicitly initialized?

1061


Comment on local and global scope of a variable.

1163


What is the use of map in c++?

1152


Write a program using display() function which takes two arguments.

1080


Is recursion allowed in inline functions?

1083


Is c++ slower than c?

1040


What are the basics of local (auto) objects?

1146


Explain the problem with overriding functions

1163


What is a c++ vector?

1057


which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

1182


Describe friend function & its advantages.

1135


What do you mean by early binding?

1068


Describe the process of creation and destruction of a derived class object?

1120


How does a copy constructor differs from an overloaded assignment operator?

1043