Practice · 3 of 4
Critique the AI's Code
CHALLENGE
Difficulty: beginner+25 XP
An AI produced second_max(nums) which claims to return the second-largest value (duplicates count: [3, 3, 1] -> 3). The shipped version is buggy: it returns min(max(nums), min(nums)). Write audit_second_max() returning a string of EXACTLY one line documenting a concrete failing input, in the form: input=[3, 3, 1] result=1 expected=3 — where result is what the buggy code returns and expected is the true second-largest.
Press Submit to check your solution.
Back to lesson: Practice: Transformation & AI Critique