written 8.6 years ago by | • modified 8.6 years ago |
Mumbai University > Information Technology > Sem 3 > Data Structure and Algorithm analysis
Marks: 3 M
Year: May 2014
written 8.6 years ago by | • modified 8.6 years ago |
Mumbai University > Information Technology > Sem 3 > Data Structure and Algorithm analysis
Marks: 3 M
Year: May 2014
written 8.6 years ago by |
A double ended queue can be defined as a homogeneous list in which elements can be added or removed from both the ends i.e. element can be added or removed from both front and rear end.
It is also called as deque.
There are two variant of double ended queue depending upon the restriction to perform insertion or deletion operations at the two ends which are as follows:
i. Input restricted deque: An input restricted deque is a deque, which allows insertion at only 1 end, rear end, but allows deletion at both ends, rear and front end of the lists.
ii. Output restricted deque: An output-restricted deque is a deque, which allows deletion at only one end, front end, but allows insertion at both ends, rear and front ends, of the lists.
i. Add an element at the rear end+
ii. Add an element at the front end
iii. Delete an element from the front end
iv. Delete an element from the rear end