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
Explain shallow copy?
Do you know what is overriding?
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
What is enum class in c++?
What is a local reference?
How to tokenize a string in c++?
Which bit wise operator is suitable for checking whether a particular bit is on or off?
What it is and how it might be called (2 methods).
How can a called function determine the number of arguments that have been passed to it?
what is c++
Carry out conversion of one object of user-defined type to another?
What is the difference between public and private data members?
the first character in the variable name must be an a) special symbol b) number c) alphabet
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?
Can c++ be faster than c?