← 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?
- A.To replace the fast solution in production
- B.As an obviously correct (slow) answer to compare the fast version against
- C.To generate random numbers
- 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 →