Goodnotes interview question

How would I test the problem with an element of randomness?