Choose a pattern from the problem contract before opening the editor. This set changes the business setting and the output rule, so a familiar-looking loop may solve the wrong task. An exact-budget route needs a spending dimension. An append-only palindrome wrapper retains a suffix instead of a prefix. Tripled IDs need modulo-three counting rather than ordinary XOR cancellation.
For each problem, write a small example by hand, state the invariant, and estimate time and space before coding. Then test a boundary the visible examples don't settle. Empty input, zero costs, repeated symbols, large coordinates, and a match that consumes the whole text all expose different assumptions.
There are no guided steps in this set. Use the hints only after you can explain where your current approach fails. After Check, compare your complexity with the reference and describe one alternate implementation that would satisfy the same contract.