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
suppose list is already created having some elements
poninted by start ......
node* start;
node*p[10];
node* ptr;
int n=0;
ptr=start;
while(ptr->next==null)
{
p[(n++)%10]=ptr;
}
if(n<10) printf("there r unsufficient elements");
else { ptr=p[n%10]}
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is microsoft c++ redistributable 2013?
How is c++ different from java?
What is a class template?
What apps are written in c++?
What is the use of typedef?
What is the first name of c++?
What jobs can you get with a c++ certification?
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
Will c++ be replaced?
What is the type of 'this' pointer?
What is the main function c++?
Can recursive program be written in C++?
What is lambda in c++?
What is object in c++ example?
Which software is best for c++ programming?