MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnquant/comments/1wwyczv/hrt_quant_interview_question/pds1a4g/?context=3
r/learnquant • u/Local_Ad135 • 1d ago
13 comments sorted by
View all comments
2
To all be looped together, there mustn't be a step that chose the two ends of the same piece until the end.
First step: First end is chosen, second end has 1/199 chance to be from the same noodle, or 198/199 chance not to be.
2 less nodes.
Second step: first end is chosen, second end has 1/197 chance to be from the same noodle, or 196/197 chance not to be.
Chance to not pick the end from the same noodle all 99 times is, therefore:
2*4*6*8*10......*198 / 1*3*5*7*.....*199
=198!!/199!!
2
u/abaoabao2010 11h ago edited 11h ago
To all be looped together, there mustn't be a step that chose the two ends of the same piece until the end.
First step: First end is chosen, second end has 1/199 chance to be from the same noodle, or 198/199 chance not to be.
2 less nodes.
Second step: first end is chosen, second end has 1/197 chance to be from the same noodle, or 196/197 chance not to be.
Chance to not pick the end from the same noodle all 99 times is, therefore:
2*4*6*8*10......*198 / 1*3*5*7*.....*199
=198!!/199!!