Hacker News new | ask | show | jobs
by damip 1292 days ago
For some reason, it is unable to solve this query. All code produced gives wrong results, and it didn't correct it when given clues:

Write a python program that efficiently computes the probability that a random permutation of r ones and w zeros contains k consecutive ones.

1 comments

this is more of a pencil and paper problem rather than a numerical one though.