State the input contract, write the Java method and run a boundary case before discussing cost. Explain which operations the browser runs and which behavior is modeled. A passing example is evidence about that input, so use the hidden cases to check a second assumption. These are original practice tasks, not attributed employer questions.