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

NO, it won't work.

because, after the wile loop, pos is pointing to the last
element NOT 10th last. So, you have to go back 10 elements.

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we delete this pointer in c++?

922


What is constructor and destructor in c++?

841


Give an example of run-time polymorphism/virtual functions.

730


What are exceptions c++?

767


What size is allocated to the union variable?

775






What character terminates all character array strings a) b) . c) END

933


How do you declare a set in c++?

714


Is there structure in c++?

761


Write a program to show polymorphism in C++?

816


How to defines the function in c++?

801


What is a c++ class?

835


What is searching?

851


What is pointer -to-members in C++? Give their syntax?

774


What does iomanip mean in c++?

835


In what situations do you have to use initialization list rather than assignment in constructors?

812