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 does ctime() do?
What is setw manipulator in c++?
List the features of oops in c++?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
What is a type library?
Can you declare an array without a size in c++?
Why do we use vector in c++?
Write a struct time where integer m, h, s are its members?
Explain linear search.
What is the fastest c++ compiler?
What are multiple inheritances (virtual inheritance)?
What is operator overloading in c++ example?
Can non-public members of another instance of the class be retrieved by the method of the same class?
Can we define a constructor as virtual in c++?
What is lambda expression c++?