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
What is the difference between public, private, and protected access?
Describe the advantages of operator overloading?
What are the operators in c++?
What is prototype for that c string function?
What is difference between n and endl in c++?
What is the use of turbo c++?
What is c++ map?
What is c++ 11 and c++ 14?
Is c++ the hardest language?
What is lvalue?
How do you invoke a base member function from a derived class in which you have not overridden that function?
what is multi-threading in C++?
Show the declaration for a static function pointer.
Explain the concept of dynamic allocation of memory?
What is the difference between a baller and a reference in C++?