Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The rolls are independent; after an unsuccessful roll your chance P(6) is identical to when you started.

>My algorithm you don't know, it might be instant, it might never finish. //

If it might never finish then it's not [completely] sorting IMO. But I'm a long way off being a comp. sci..



An algorithm that guarantees correct answers but has random runtime that may even be unbounded is called a Las Vegas algorithm.

https://en.wikipedia.org/wiki/Las_Vegas_algorithm




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

Search: