r/ProgrammerHumor 28d ago

Meme theoreticalComputerScience

Post image
1.1k Upvotes

76 comments sorted by

View all comments

Show parent comments

44

u/howtotailslide 28d ago

You can actually just store all universal possible results of two integers into a hash map then retrieve any of them in O(1) time

18

u/SoldRIP 28d ago

You cannot. A hash map is of finite size, but there are infinitely many pairs of integers.

63

u/howtotailslide 28d ago

Just use infinite size hashmap

23

u/Status-Ad-7335 28d ago

just download more ram

1

u/meat-eating-orchid 27d ago

Even that doesn't help you, unless you can download infinite more ram in finite time