Q176
What is the functionality of the following piece of code? public int function() Node temp = tail.getPrev(); tail.setPrev(temp.getPrev()); temp.getPrev().setNext(tail); size--; return temp.getItem();
A.
Return the element at the tail of the list but do not remove it
B.
Return the element at the tail of the list and remove it from the list
C.
Return the last but one element from the list but do not remove it
D.
Return the last but one element at the tail of the list and remove it from the list
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board