Empresa engajada
How to randomly select a number with equal probability from an array with unknown size?
Sigiloso
Keep a variable as the return result and current size of the array. Update the result with probability size-1/size, when getting new number.
Fique por dentro de todas as oportunidades e dicas internas seguindo as empresas de seus sonhos.
Comece a buscar vagas para receber atualizações e recomendações personalizadas.