Laboratory / Computing

Algorithms and cost

Trace linear and binary search over increasingly large collections. Count comparisons rather than milliseconds, then plot how those counts change when input size doubles.

Change one thing
55
35
Trace linear and binary search over increasingly large collections. Count comparisons rather than milliseconds, then plot how those counts change when input size doubles. Current reading: At input setting 55, the linear route grows with every item while the halving route grows with the number of times the input can be divided by two.linear scanbinary search
What changed

At input setting 55, the linear route grows with every item while the halving route grows with the number of times the input can be divided by two.

Return to the route

Experiment after prediction.

Before changing a control, say which visible feature should move and which should remain invariant. That prediction is the useful part of the experiment; motion alone is not evidence.