Empleador activo
How to randomly select a number with equal probability from an array with unknown size?
Anónimo
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.
Sigue a tus empresas favoritas para estar al tanto de las últimas oportunidades y disponer de información desde adentro.
Recibe recomendaciones y actualizaciones personalizadas al iniciar tu búsqueda.