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
In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h
What is pure virtual function? Or what is abstract class?
Will rust take over c++?
What are the methods of exporting a function from a dll?
What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?
Do you know the problem with overriding functions?
What kind of jobs can I get with c++?
What is the difference between the compiler and the preprocessor?
What is c++ try block?
Is std :: string immutable?
What is the use of dot in c++?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
Write my own zero-argument manipulator that should work same as hex?
which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
In the derived class, which data member of the base class are visible?