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
Are vectors passed by reference c++?
What is c++ similar to?
What's the order in which the local objects are destructed?
Does improper inheritance have a potential to wreck a project?
What is the difference between while and do while loop?
How a new operator differs from the operator new?
Explain container class.
Define Virtual function in C++.
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
When should you use global variables?
What is DlgProc?
What does asterisk mean in c++?
Define 'std'.
What is the difference between delegation and implemented-in-terms-of?
What is the difference between global variables and local variable