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

What do you mean by const correctness?

619


Does c++ have foreach?

517


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

595


What are c++ storage classes?

614


What are punctuators in c++?

642






What is the difference between multiple and multilevel inheritance in c++?

586


When does the c++ compiler create temporary variables?

560


Can c++ do everything c can?

590


Should I learn c or c++ or c#?

551


Which programming language is best?

541


Name the debugging methods that are used to solve problems?

573


What is purpose of new operator?

589


What is the use of bit fields in structure declaration?

534


What is a dangling pointer in c++?

648


What are the advantages of using a pointer? Define the operators that can be used with a pointer.

597