Count the work in a search

15-minute session: read for 3 minutes, trace for 3, experiment for 7, and complete the check for 2. Spend longer whenever you need.

Linear search may inspect every element. Count comparisons for a match at the start, a match at the end, and a missing value. Big-O describes growth, not a measured duration on your machine. Compare sizes 10, 100, and 1000 before choosing a different structure.

Practice and evidence: Predict the example or draw its state transitions. Change one assumption, test the boundary, and record the actual result. Explain what this small model does not establish about a production system.

items=list(range(10))
checks=0
for value in items:
    checks+=1
    if value==9:break
print(checks)

Expected result: 10

Practice and evidence

Keep three notes: your prediction, the actual result, and why they match or differ. The completion check grades understanding; the practice task builds skill.