Algorithm Book - Chapter 1 - Fundamentals Flashcards

1
Q

What is the purpose of a T-diagram?

A

A t-diagram records the state of local variables, including arrays and their indices.

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

What should you keep in mind when working with a t-diagram for if/else statements

A

Before a conditional (if/else, or each time through a while or for loop) check variable values in a t-diagram to predict how code will behave.

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