Abstract Data Types Flashcards

(9 cards)

1
Q

What is a list in the context of ADTs?

A

A list is an ADT for holding ordered data.

Examples include array and linked list.

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

Define a dynamic array.

A

A dynamic array is an ADT for holding ordered data and allowing indexed access.

An example is a standard array.

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

What is a stack?

A

A stack is an ADT in which items are only inserted on or removed from the top of a stack.

It is typically implemented using a linked list.

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

Describe a queue.

A

A queue is an ADT in which items are inserted at the end of the queue and removed from the front of the queue.

This structure is often implemented using a linked list.

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

What is a deque?

A

A deque (pronounced ‘deck’) is an ADT in which items can be inserted and removed at both the front and back.

It is commonly implemented using a linked list.

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

Define a bag in terms of ADTs.

A

A bag is an ADT for storing items in which the order does not matter and duplicate items are allowed.

Examples include array and linked list implementations.

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

What is a set in the context of ADTs?

A

A set is an ADT for a collection of distinct items.

Implementations include binary search tree and hash table.

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

What characterizes a priority queue?

A

A priority queue is a queue where each item has a priority, and items with higher priority are closer to the front of the queue than items with lower priority.

This structure is typically implemented using a heap.

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

Define a dictionary (map) in terms of ADTs.

A

A dictionary is an ADT that associates (or maps) keys with values.

Common implementations include hash table and binary search tree.

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