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 / atul bodke
correction in prev answer ...
i saw it after posting ... :)
correction in while loop ...
while(ptr!=null)
{
p[(n++)%10]=ptr;
ptr=ptr->next;
}
................................
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What does scope resolution operator do?
What is the main purpose of overloading operators?
What is a catch statement?
When should overload new operator on a global basis or a class basis?
Which coding certification is best?
What are the advantages of pointers?
When do you call copy constructors?
What is the prototype of printf function?
Do you know the problem with overriding functions?
What is the difference between global variables and static varables?
How the memory management in vectors are being done. What happens when the heap memory is full, and how do you handle it ?
What is the use of 'using' declaration in c++?
Define copy constructor.
Can class objects be passed as function arguments?
What is iterator in c++?