Recover from a vague request to speed up code

Judgment callEasy15 min

Your task

You asked an AI assistant to "make this function faster". It rewrote your 20-line Java function as a denser version using streams. You cannot tell whether it is actually faster or only looks different, and you are not sure speed was your real problem.

What went wrong with how you asked, and how would you approach it now?

It covers

  • Narrow the task
  • Ambiguous result