data structures Flashcards

(15 cards)

1
Q

what is an array?

A

an ordered finite set of elements of a single type

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

how do you search through a 2D array?

A

go down the rows then across the columns to find the given position

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

what is a record?

A

is a row in a file that is made up of fields, they are used in databases

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

what is a list?

A

-data structure consisting of a number of ordered items where they can occur more than once.
-They are stored non-contiguously (do not have to be next to each other in memory unlike arrays)
-can contain multiple data types

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

what are tuples?

A

ordered set of values of any type, it is immutable (cannot be changed)

once elements are added they cannot be removed

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

what is a linked list?

A

dynamic data structure used to hold an ordered sequence

each item is called a node and contains a data field

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

what is a stack?

A

a last in first out data structure, items can only be removed from the top of the stack

used to reverse an action

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

what is a queue?

A

a first in first out data structure, items are added to the end and removed from the front
linear queues are datas structures consisting of an array

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

what is a tree?

A

-connected form of a graph
-have a root node which connect other nodes by branches

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

traversing a binary tree methods?

A

pre order, in order, post order

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

how to do pre order?

A

outline the tree
begin from the far left line
order them when at the number’s left

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

how to do in order?

A

outline the tree
begin from the left
order them when below the number

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

how to do post order?

A

outline the tree
begin from the left
order them when on the right of the number

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

what is a hash table?

A

an array which is coupled with a hash function

takes a data (key) and releases an output (hash)

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