0
7.2kviews
Define double ended queue and give its applications

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

Marks: 3 M

Year: May 2014

1 Answer
0
309views
  1. A double ended queue is a homogeneous list in which elements can be added and deleted from both the ends i.e. we can add a new element at the rear or front end and also we can remove an element from both front and rear end.

  2. They are also called as deque. The various possible operations performed on deque are:

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

  1. Applications:

i. They can be used in job scheduling algorithm. This algorithm implements task scheduling for several processors. A separate deque with threads to be executed is maintained for each processor. To execute the next thread, the processor gets the first element from the deque .

ii. Undo-redo operations in software applications.

Please log in to add an answer.