Data Structures Flashcards

1
Q

Array

A

Store multiple items of same data type, homogenous

Static

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

Record

A

Collection of related fields (variable, each diff data types)
Define, declare and assign
Array of records to store multiple records

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

Tuple

A

Immutable
Static
Better for memory than lists

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

Stack

A

LIFO
Pop, push
Functions:
call stack (keep track of addresses control must return to when subroutine ends)

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

Queues

A

FIFO
enQueue(), deQueue()
Functions:
Output waiting to be printed

Linear queue (items move up when removed or pointers)
Circular queue
Priority Queue

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

List

A

Dynamic tuple

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

Linked list

A

Versatile data structure

Items not in contiguous data locations

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

Graphs

A

Dynamic data structures
Undirected/directed
Weighted/unweighted

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

Adjacency matrix vs list

A

Graph storing
Poor for memory

Vs

Better for memory

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

Depth first

A

Use stack
Start at root down 1 branch as far as possible
Backtrack

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

Breadth first

A

Use queue

Root, scan left to right

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

Binary Search Tree

A

Max 2 children
Data placed left if smaller and right if smaller
Hierarchy

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

Hash table

A
Combine arrays and linked list 
Fast search 
Index physical address on file where data is held used
Hash junction is used 
Collision can occur
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Variable vs Constant

A

Identifier that refers to memory location, value of which changes during run time

Vs

“” - does not change

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