Question 1
Which class implements both the Queue and Deque interfaces in Java?
Stack
ArrayList
ArrayDeque
PriorityQueue
Question 2
What is the main difference between Queue and Deque interfaces?
Queue allows LIFO and Deque allows FIFO
Queue allows FIFO, Deque allows both FIFO and LIFO
Queue does not allow null elements, Deque does
Both are same
Question 3
Which queue class maintains natural ordering or uses a Comparator?
ArrayDeque
PriorityQueue
LinkedList
Stack
Question 4
What happens if you try to insert null into an ArrayDeque?
It gets inserted
NullPointerException
Compiles but throws at runtime
It replaces an existing null
Question 5
Which of the following allows insertion and deletion from both ends?
Queue
Stack
ArrayDeque
PriorityQueue
Question 6
What is the time complexity of offer() and poll() operations in a LinkedList-based queue?
O(n)
O(log n)
O(n log n)
O(1)
There are 6 questions to complete.