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
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
What is istream c++?
Why do we need runtime polymorphism in c++?
What jobs can you get with a c++ certification?
What is an arraylist c++?
what are Operators and explain with an example?
How can you link a c++ program to c functions?
Explain the differences between list x; & list x();.
How to tokenize a string in c++?
Explain the difference between struct and class in terms of access modifier.
Is there finally in c++?
Write about the role of c++ in the tradeoff of safety vs. Usability?
How is data hiding achieved in c++?
Differentiate between a template class and class template in c++?
Difference between an inspector and a mutator