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 / ravindra
simple,
in case the list has say 90 elements, then for every 10
elements, he is writing to the array. though the array size
is 10, this is done by saying pos%10.
thus when the list is iterated he just substracts 10 from
the pos and then does %10 since he has to factor in, that
array starts from 0 and not from 1 :)
Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
the first character in the variable name must be an a) special symbol b) number c) alphabet
What causes a runtime error c++?
How do you establish a has-a relationship?
Define upcasting.
Explain how overloading takes place in c++?
What is the best c++ compiler?
What is #include iostream?
How much do c++ programmers make?
Do you need a main function in c++?
Where do I find the current c or c++ standard documents?
What is the basic concept of c++?
Describe delete operator?
Explain stack unwinding.
Is c++ platform dependent?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that