COMPUTER SCIENCE AND ENGINEERING
DATA STRUCTURES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Deque
|
|
Enqueue
|
|
peek
|
|
full
|
Detailed explanation-1: -The insertion in a linear queue must happen from the rear end and deletion from the front end. But, in deque, you can perform both insertion and deletion operations at both of its ends. That’s why it is called a Double-Ended Queue (Deque).
Detailed explanation-2: -A dequeue in data structure is a linear data structure, which stands for Double Ended Queue. In a deque, the data can be inserted and deleted from both front and rear ends. Unlike queue, dequeue in data structure doesn’t follow the FIFO rule (First in first out).
Detailed explanation-3: -Deque or Double Ended Queue is a type of queue in which insertion and removal of elements can either be performed from the front or the rear. Thus, it does not follow FIFO rule (First In First Out). Representation of Deque.
Detailed explanation-4: -Double ended Queue: Double Ended Queue is also a Queue data structure in which the insertion and deletion operations are performed at both the ends (front and rear).
Detailed explanation-5: -Naming conventions. Deque is sometimes written dequeue, but this use is generally deprecated in technical literature or technical writing because dequeue is also a verb meaning “to remove from a queue".