If timing and counting both work, why aren't they enough, and which input and which case should an efficiency claim be about?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
costs holds one function's operation counts at inputs 10, 100, 1,000 and 10,000, each ten times the one before. Small inputs can hide the growth, so let the largest inputs decide. Define behaviour(costs) returning exactly one of the strings 'constant', 'linear', 'quadratic' or 'logarithmic'.
Timing versus counting, and where each falls short
Compare timing and counting on machine and implementation dependence, note what timing hides on small inputs, and reduce the count to what still matters once the input is large.
Measuring the algorithm's scalability in terms of input size
Classify mysum as order and the nested-loop square as order from how runtime scales when the input doubles or grows 10-fold, and list the four behaviours seen so far.
Choosing the input that drives growth
Vary each quantity in is_in(L, e) in turn (the value of e, the magnitudes in L, the length of L) with a pair of searches each, and record which one drives the runtime.
Worst-case analysis of a membership search
Describe the worst, best and average inputs for is_in and how much of L each one examines, and state that the course always analyses the worst case.