Y
Hacker News
new
|
ask
|
show
|
jobs
by
petters
407 days ago
This also got me past one interview. I came up with k/n but now I think it's better to just generate a random float in [0, 1] and keep the k largest ones