3 ms·
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
by pbhjpbhj 8y ago
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..
- daveFNbuck 8y agoAn 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 https://en.wikipedia.org/wiki/Las_Vegas_algorithm