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.
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.