🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Testing AI Code: all 10 questions

Quiz: Testing AI Code · Question 3 of 10

What input type made the AI's max-subarray function wrong?

What input type made the AI's max-subarray function wrong?

  1. A.Lists with only positive numbers
  2. B.Lists where every number is negative
  3. C.Empty strings
  4. D.Very long lists
Answer & explanation

Correct answer: Lists where every number is negative

It returned 0 (an empty subarray) instead of the largest single negative number.

Can you get the rest right without peeking?

Take the timed Quiz: Testing AI Code quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →