Dequeue?(not covered anywhere)

Hey dequeue is not covered anywhere actually what is it
?

Hey @bhavik911
The Java Deque interface, java.util.Deque , represents a double ended queue, meaning a queue where you can add and remove elements to and from both ends of the queue. The name Deque is an abbreviation of Double Ended Queue .
it is part of java collection framework

What about its implementation?

For implementing deque , we need to keep track of two indices, front and rear. We enqueue(push) an item at the rear or the front end of qedue and dequeue (pop) an item from both rear and front end. Inserting First element in deque , at either front or rear will lead to the same result.

Cant we do dequeue = new dequeue<>(); why are we using linked list

Also why cant we just use queues

dequeue is used with linked list here please explain and why are we not using it with arrays

@bhavik911
The Deque interface present in java.util package.
Question : Also why cant we just use queues
Answer : Queue is double ended , its Not Gives correct for all Test case .
Question : dequeue is used with linked list
Answer : We enqueue(push) an item at and dequeue (pop) an item from both both end of the LinkedList.(easily)
Question : why are we not using it with arrays
Answer : You can use no Issue ( pehle implement krna hoga ).

Question : why are we not using it with arrays
Answer : You can use no Issue ( pehle implement krna hoga ).

Jese linkedlist mein kara vese hi nahi kar sakte?
Deque q = new int[];???

nhi kr skte hai pehle Deque implement krna hoga