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 / mms zubeir
I got it, thank you.
but one suggestion, instead of using
printf("Tenth last element is %d",nodes[(pos-10)%10]->data);
you can simply give,
printf("Tenth last element is %d",nodes[pos%10]->data);
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What are the effects after calling the delete this operator ?
What is the maximum value of a unsigned char a) 255 b) 256 c) 128
What is the use of typedef?
What is the fastest c++ compiler?
What is the main purpose of overloading operators?
What are move semantics?
How can I learn dev c++ programming?
What is the most useful programming language?
What are register variables?
What are the extraction and insertion operators in c++?
What are the basic data types used in c++?
What is the disadvantage of using a macro?
Name the implicit member functions of a class.
How is modularity introduced in C++?
What is the best free c++ compiler for windows?