Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "A linear scan stops when it finds its target. Which statement is precise?" on CodeWiki (https://codewiki.com/practice/mcq/foundations/algorithmic-complexity/scan-cases/).
Context (verbatim from the page):
"""
A linear scan stops when it finds its target. Which statement is precise?
Its time is always Θ(1).
Its best case is Θ(1), while its worst case is Θ(n).
Its average case is automatically Θ(n / 2).
Its worst case is Θ(n²).
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in CS foundations. Where you are unsure, say so.