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 faster than c++?
What relational operators if statements in c++?
List the advantages of inheritance.
Why c++ is faster than java?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
What are the advantage of using register variables?
write a programme to get a character and thier ASCII value
What is set in c++?
When to use “const” reference arguments in a function?
What do you understand by pure virtual function? Write about its use?
What is purpose of new operator?
What is buffering in c++?
What is the header file for setw?
In the derived class, which data member of the base class are visible?
Is c++ the hardest programming language?