Re:Ask HN: How many times will this loop run on average?
by hardlianotion on Sunday December 31, 2023 @03:47PM
(#38827401)
I edited my response with an apology! Thanks for checking!
[ Parent
| on HN ]
Re:Ask HN: How many times will this loop run on average?
by aalhour on Sunday December 31, 2023 @03:57PM
(#38827454)
No worries, I think your solution coverges with @Someone's above, if I am not mistaken. You're multiplying the probabilities for all values of j up to i for all values of i.
Re:Ask HN: How many times will this loop run on average?
by hardlianotion on Sunday December 31, 2023 @04:06PM
(#38827524)
Yes I am and yes I think it does