0
6.2kviews
Define Double Ended queue. List the variant of Double ended queue

Mumbai University > Information Technology > Sem 3 > Data Structure and Algorithm analysis

Marks: 3 M

Year: May 2014

1 Answer
0
435views
  1. 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.

  2. It is also called as deque.

  3. 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.

  1. Various possible operations performed on double ended queue are as follows:

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

Please log in to add an answer.