Library › Coding AI › High school students

Get hints on an AP CS ArrayList answer without the solution

Practice: Setting limits and rules. About 5 minutes.

About this exercise

You're practicing an AP CS A free-response question and your removeShort method fails a test. You want feedback, not a solution: exactly 3 numbered hints, each under 30 words, with the first hint about what happens to the list's indexes after remove, and the last hint ending with a question you can answer by tracing. No code blocks, no rewritten method, under 100 words in total.

Common mistakes when you ask AI for this

  • Getting the solution. For a homework-style question, the AI's default is to write the working method, which doesn't help you on the real exam. Try: Say: "Give hints only. Don't write the method or tell me the exact fix."
  • Hints in the wrong order. The AI starts with style tips or the loop bounds instead of the actual bug. Try: Add: "Hint 1 is about what remove does to the indexes."
  • No way to check yourself. Without a question to trace, you just take the AI's word for it. Try: Add: "End the last hint with a question I can answer by tracing the first test."
  • Too much to read. The AI writes a full explanation with headings and tips. Try: Add: "Exactly 3 numbered hints, each under 30 words."

What a strong prompt includes

  • Asks for hints, not a solution
  • Sets the number of hints
  • Points hint 1 at remove
  • Asks for a tracing question
  • Caps each hint

Practice this now ↑

Related exercises