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 / mayank pathak
Maintain a queue with ten elements. As u encounter a new
element in the linked list dequeue one element and enqueue
this new element. When the link list is fully scanned the
first element of the queue would be the 10th last element.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
If all is successful, what should main return a) 0 b) 1 c) void
What is endl c++?
What is microsoft c++ redistributable?
What is iterator c++?
What are the advantages of c++ over c?
What do you mean by delegate? Can a user retain delegates?
Is the declaration of a class its interface or its implementation?
How to tokenize a string in c++?
What relational operators if statements in c++?
What information can an exception contain?
What is constant in c++ with example?
Explain the purpose of the keyword volatile.
Is atoi safe?
How to demonstrate the use of a variable?
Is there structure in c++?