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 / dark knight

1-TAKE TWO POINTERS
2-ITERATE 1 POINTER IN THE LIST UP TO THE 10th POSITION FROM STARTING
3-INITIALLY----2nd POINTER IS AT THE HEAD NODE .
4-NOW INCREEMENT both POINTER TO THE NEXT POTISION SUCH THAT THE
1st pointer reaches end .
5--2ND POINTER IS THE REQUIRED NODE

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a Structure contain a Pointer to itself?

808


How do you define a class in c++?

830


Explain the concept of dynamic allocation of memory?

844


What are the main features of c++?

751


What are activex and ole?

772


Explain what are mutator methods in c++?

766


When do we use copy constructors?

784


What is setbase c++?

818


Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. Your program should work for squares of all side sizes between 1 and 20. --- │ │ │ │ │ │ ---

1860


What are c++ tokens?

800


What causes a runtime error c++?

812


Is c++ the hardest language?

746


What is meant by a delegate?

801


Explain the static storage classes in c++.

930


What is the benefit of learning c++?

727