Introduction to Abstract Data Types Flashcards

1
Q

Abstract Data Type

A

a data type described by predefined user operations

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

List

A

ADT for holding ordered data

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

Dynamic Array

A

ADT for holding ordered data and allowing indexed access

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

Stack

A

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

last in, first out

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

Queue

A

ADT in which items are inserted at the end of the queue and removed from the front of the queue

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

Deque

A

ADT in which items can be inserted and removed at both the front and back

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

Bag

A

ADT for storing items in which the order does not matter and duplicate items are allowed

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

Set

A

ADT for a collection of distinct items

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

Priority Queue

A

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

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

Dictionary (Map)

A

ADT that associates (or maps) keys with values

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

Python’s Common Supported ADTs

A

list, set, dict, queue

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

C++’s Common Supported ADTs

A

vector, list, deque, queue, stack, set, map

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

Java’s Common Supported ADTs

A

Collection, Set, List, Map, Queue, Deque

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

realloc definition

A

re-allocates an original pointer’s memory block to be the newly-specified size (either increase or decrease)

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

realloc function

A

(type)realloc(pointerVariable, numElementssizeof(type));

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

dynamic set

A

set that can change after being constructed

16
Q

information hiding

A

Internal implementation of the data and operations are hidden from the ADT user