Data structures - paper 1 Flashcards

1
Q

What is an array?

A

An array is an ordered, finite set of elements of a single data type. They are zero indexed

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

When searching arrays do you go down and across or across and down?

A

Down the rows then across the columns

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

What is a record?

A

A row in a file and is made up of fields

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

What is a list?

A

A data structure containing a number of ordered items where the items can occur more than once.

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

What is a tuple?

A

An ordered set of values of any type is called a tuple. A tuple cannot be changed - nothing can be added or removed once created.

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

What is a stack?

A

A last in first out data structure
Items can only be added or removed from the top of the stack.
Can be static or dynamic

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

What is a queue?

A

A first in first out data structure
Items are added to the end of the queue and removed from the front.

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