Re:Ask HN: What have you found the worst interview question ...
by seattle_spring on Tuesday February 05, 2019 @12:08PM
(#19087229)
That was literally my first guess, and he flatly said it was wrong and not reliable, and to try again. I'm not joking here.
But, given that this was a front end job, a common way to visually test the quality of a pseudo-random number generator is to generate a series of numbers and plot the results with pixels visually[1]. If the PRNG is high quality you’ll get a nice even static field. If there is a bias it will show up as a gradient or pattern in the pixels. I suspect this is actually what the interviewer was after.
[1] http://judeokelly.com/simple-visual-random-number-test/