Doesn't test distribution or use of reservoir sampling


  • 0
    A

    I used rand()%headLength and my C solution was accepted, but it is well-known that rand()%foo does not give a uniform distribution. It's easy to test for, too, so I don't know how they are checking distribution...


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.