Question d’entretien chez BeyondMath

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