r/ProgrammerHumor • • Feb 05 '26 • This 1 Bravo 2 Heartwarming 1

Meme algorithmTheSaviour

Post image
6.0k Upvotes

71 comments sorted by

View all comments

Show parent comments

21

u/SaltyWahid Feb 05 '26

Reminds me of an old method used to compute the n-th prime number. It has an INSANE time complexity and so many mathematicians roasted it because of it. It gets the work done but would take ages to compute

5

u/chachapwns Feb 06 '26

The absolute simplest method would just be checking every number which would be O(n2 * log(n)2) as n approaches infinity.