Paper 1 Flashcards

1
Q

Recursion

A

Function that repeatedly calls itself until condition is met
3 essential characteristics:
- Stopping condition or Base Case
- Stopping condition must be met after a finite number of calls
- for all input value apart from the stopping condition the routine must call itself

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

Call Stack structure

A

Identifier

Parameter
Local Variables
Return Address

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

Abstract Data Types

A

Organising collection of data with particular features and access restrictions independent of any programming language

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

Dynamic data structure

A

Has a fixed size

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

Dynamic data structure

A

Can change size ( same size as number of values stored in it)

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

Stack commands

A

Peek
Pop
Push
IsEmpty
IsFull

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

Process

A

Instance of a program being ran

Each process allocated its own section of main memory by OS

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

Static memory allocation

A

Value has fixed size of that can be allocate space before running

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

Dynamic memory allocation

A

Some values are unknown about how much space is needed to store

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

Heap

A

Pool of unallocated memory ready to store data for objects
Data allocated dynamically and grows and shrinks in size as program runs and objects are created or unallocated

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

How to detect an empty queue ?

A

rearPointer = frontPointer = -1

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

Detect full queue ?

A

RearPointer = maxSize - 1

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

Priority Queue

A

Some items jump queue due to their importance

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