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 / anon
Have two pointers p1 and p2.p1 points to the first node in the linked list.p2 to the tenth node.Now move both the pointer togther till p2->link = NULL.P1 is pointing to the 10th node from the last
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Is swift a good first language?
What are keywords in c++?
What it is and how it might be called (2 methods).
Differentiate between an inspector and a mutator ?
What is function overloading in C++?
Why is the function main() special?
How do we implement inheritance in c++?
What is #include math h in c++?
What is a set in c++?
What is the extension of c++?
What is c++ flowchart?
Define a constructor?
What is lvalue?
What does the ios::ate argument do?
Differences between private, protected and public and give examples.