🎙 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 4 of 10

What is a brute-force reference used for in randomised testing?

What is a brute-force reference used for in randomised testing?

  1. A.To replace the fast solution in production
  2. B.As an obviously correct (slow) answer to compare the fast version against
  3. C.To generate random numbers
  4. D.To make tests pass
Answer & explanation

Correct answer: As an obviously correct (slow) answer to compare the fast version against

If the fast and brute-force answers ever differ on a random input, you've found a bug.

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 →