2.1.4 - Thinking Logically Flashcards

Component 2

1
Q

What are the examples of branching?

A

IF Statement

Case/Switch Statement

BRP / BRA / BRZ

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

What decisions are made in the enqueue and dequeue algorithms?

A

Format to use: What is the decision?| Action if true | Action if false:

Enqueue – Is the queue already full? | Return error | enqueue item to queue and adjust pointer

Dequeue – Is the queue empty? | Return error | dequeue item and adjust pointer

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

What decisions are made in the pop and push algorithms?

A

Format to use: What is the decision?| Action if true | Action if false:

Push – Is the stack already full? | Return error | push item and adjust pointer

Pop – Is the stack empty? | Return error | pop item and adjust pointer

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