Pergunta de entrevista da empresa BeyondMath

Code up a proportional sampling algorithm that has order log(n) time and space complexity