Dequeue ADT Flashcards

1
Q

What is a dequeue?

A

a double ended queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a doubly linked list?

A

very similar to a singly linked list, but it can be traversed forwards and backwards. This means for each add or remove operation, we need to update the ‘previous’ pointer as well as the ‘next’ pointer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the main methods for a doubly linked list?

A

addFirst,
addLast,
removeFirst,
removeLast

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the runtimes for the methods in a doubly lined list

A

all theta 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the dequeue for?

A

applications that require modification at both ends of the queue, i.e a palindrome checker

How well did you know this?
1
Not at all
2
3
4
5
Perfectly