The infinite monkey theorem says a monkey smashing keys forever will eventually type anything—even Shakespeare.
But what about a specific sentence like "Hello, World!"? Turns out, it doesn’t need infinite time—just some time. So, I wrote this C++ code to find out exactly how much!
- The monkey types random ASCII characters. 🐵
- Through sheer chaos (and patience), it eventually types your sentence!
- It even tells you how long it took (in monkey years, months, days...).
Because... why not?
- Might take forever for longer sentences. Like, "heat death of the universe" forever.
- Monkeys aren’t this fast IRL.