unit 3 Flashcards

(25 cards)

1
Q

what is an array

A

list within a code
fixed in size and need declaring before use

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

what is a 1d array

A

most basic array
single index to reference
use a single access method

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

what is a 2d array

A

grid of rows and columns
data is accessed using a row and column indicator

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

what is a 3d array

A

cube like structure of 2d arrays
layers rows and columns

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

what is a stack

A

data structure capable of holding a linear sequence of items
last in first out
one item is pushed in and first item is popped

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

what is a push operation

A

adds a new item to stack
each item added adjusted the top pointer position

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

what is a pop operation

A

removes an item
only adjusts the top pointer may not remove data

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

what is a linked list

A

dynamic data structure
head and tail pointers
can be ordered or unordered
when removing gives a previous node the deleted nodes pointer

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

what is a queue

A

holds linear sequence of items
first in first out

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

what does enqueue do

A

adds an item to the queue

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

what does dequeue do

A

removes the oldest item in the queue

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

what is a binary tree

A

root node connected to child nodes/parent nodes

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

what are the uses of a binary tree

A

storing ands managing files
path finding algorithms
records data by heirarchy

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

what is data

A

what’s being stored

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

what is a left pointer

A

location of left child node

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

what is a right child node

A

location of right child node

17
Q

what is pre order traversal

A

node left right
start at root, follow left node down then follow right edge

18
Q

what is in order traversal

A

left node right
start at left node, then to root then to right node

19
Q

what is post order traversal

A

left right node
start at root, go left, go right

20
Q

what is a hash table

A

makes use of array
generates an index number from the data
fast access

21
Q

what is the load factor

A

n/k
occupied/total number

22
Q

what is a hash function

A

hash value from a key then undergoes a MOD calculation

23
Q

what are collisions

A

data gets overwritten when the hash functions produce the same hash values for two or more keys

24
Q

what is linear probing

A

stores the value in the next available space when collision occurs
very slow

25
what is chaining
data stored with pointer value, pointer changes after a collision to show new location much faster