Data structures Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Strong type

A

standard types, such as integer and character - provide the basis for all other types, and a fixed amount of memory is defined

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

Static types

A

require a fixed amount of memory, such as arrays (and sets), but not included in the pre-defined types - must be declared before use

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

Dynamic types

A

may be expanded given the limitation of available memory e.g. files and pointers -> lists, queues and trees

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

Queue

A

FIFO data structure - elements added only to end of queue and removed from front of queue

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

Circular queue

A

queue implemented within an array, where the first element of the array logically follows the last element

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

Priority queue

A

queue in which the highest-priority elements are removed first; within a priority queue, the earliest arrival is removed first

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

List

A

consists of a number of items in which the same item may occur more than once

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

Stack

A

LIFO data structure - used in calculations and to hold return addresses when subroutines are called

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

Hash table

A

a data structure that implements a dictionary or associative array

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

Collision

A

occurs when a hash function produces the same value for two or more keys -> cannot store two sets of data in the same location

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

Linear probing (open addressing)

A

places data in the next free position in hash table

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

Chaining (closed addressing)

A

uses linked lists, instead of storing actual data in the hash table

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

Mid-square method

A

first square item, extract a portion of the resulting digits, then perform mod to get an address

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

Folding method

A

divide item into equal-size piece, add pieces together, then perform mod to get an address

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

Dictionary

A

abstract data type that defines an unordered collection of data as a set of key-value pairs

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

Graph

A

data structure consisting of a set of nodes connected by a set of edges

17
Q

Tree

A

uses a set of linked nodes to form a hierarchal structure starting at a root node - each node is a child of parent node

18
Q

Rehashing

A

process of rerunning hashing algorithm in the event of a collision