In some problems, you're required to return a random value, such as https://leetcode.com/problems/random-pick-index. How does Leetcode verify the solution is selecting at random?
Just curious. I wonder how this is done in theory and in practice. I can think of a few ways, but none of them seem foolproof or efficient...