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
What is one dimensional array in c++?
True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends
What is the operator in c++?
program explaining feautures of c++
What is difference between malloc()/free() and new/delete?
What are the characteristics of friend functions?
What is the difference between method overloading and method overriding in c++?
What is the best way to declare and define global variables?
Why is c++ called oops?
What is class invariant in c++?
What are guid? Why does com need guids?
What are arithmetic operators?
What are the syntactic rules to be avoid ambiguity in multiple inheritance?
What are the uses of static class data?
How to get the current position of the file pointer?