1.

Where does a new element be inserted in linked list implementation of a queue?(a) Head of list(b) Tail of list(c) At the centre of list(d) All the old entries are pushed and then the new element is insertedThis question was posed to me during an online exam.My doubt is from Data Structures-Queue topic in division java.util – The Collections Framework of Java

Answer»

The correct OPTION is (B) Tail of list

Easy EXPLANATION: To maintain FIFO, newer elements are INSERTED to the tail of the list.



Discussion

No Comment Found

Related InterviewSolutions