Free practice · single-choice · medium
Practice
Read an intermediate trace state
A trace begins with total=0 and count=0. After processing 12 and then 15 from [12, 15, 9], which state is correct?
Intermediate trace checkpoint
Stop after two items and inspect only the state reached so far
- Initial state
- total = 0, count = 0
- Processed
- 12, then 15
- Not processed yet
- 9
- Checkpoint
- State immediately after the second update
Do not jump to the end of the list. The selected row must reflect exactly two additions and exactly two count updates.