These eight problems use the patterns from this unit on new data, without saying which one applies. Before you code, name the pattern and the reason: a range question about fixed data, a choice you can defend with an exchange argument, or a number fact with an overflow risk.
Each problem hides one trap that the hidden tests check: a negative remainder, an empty prefix, a pair that weighs exactly the limit, a booking that ends where the next one starts. Say the trap out loud before you run the code, then check whether the tests agree with you.
Name the pattern and its trap before you code.