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 / aaptuster
Cant we simply check it using 10 dereferencing.
ptr -> ptr -> ptr -> ptr -> ->ptr and so on...
This could be generalized for n, as we could generate this
command string on the fly and execute the command ..
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is object file? How can you access object file?
Explain how overloading takes place in c++?
What is abstraction in c++ with example?
What are all predefined data types in c++?
What are destructors?
What is pair in c++?
Explain the pure virtual functions?
What is DlgProc?
How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
Is std :: string immutable?
What do nonglobal variables default to a) auto b) register c) static
Write bites in Turbo c++ Header ("Include") Files.
What's the "software peter principle”?
How to declare a pointer to an array of integers?