Ad
  • Default User Avatar

    I considered this, but note that the description says Suppose a variable x can have only three possible **different** values (emphasis mine). Even if it was possible that the author intended that the "different" values could in fact be the same value, (or, maybe meant possibly rather than possible), when in doubt, I consider the test cases to be a solid indicator of the author's intent unless they themselves later say otherwise.

    Looking at the test code itself, each translation seems to have code that specifically prevents duplicates, by choosing again, by choosing from distinct ranges, using a built-in API for distinct random choices, or even simply skipping that test, so I'm leaning towards it being intentional.