Yes, let's talk about math and resources!
Can you replace this line:
i += jump
with
i += jump
time.sleep(0.000001). # time required to perform a jump
and then maybe you understand why the first program is 10x less efficient than the second.
Also, it is hard to figure out what problem the scripts are trying to solve, but it definitely is not a benchmark to prove the birthday paradox, since you shrink down the remaining options after every loop.
Also, kangaroos don't stop after going past the end of the interval. They continue their walk indefinitely. It is not the same thing as the birthday paradox.
Execution time: 7.475505113601685 seconds
Total matches: 46
Execution time: 0.8068211078643799 seconds
Total matches: 7
If you respond with questions, you are not answering, you are just diverting the topic.