Hacker News new | past | comments | ask | show | jobs | submit login

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.




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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: