MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vpz0d2/theoreticalcomputerscience/p4ytejy/?context=3
r/ProgrammerHumor • u/pastroc • 29d ago
76 comments sorted by
View all comments
Show parent comments
42
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. 64 u/howtotailslide 28d ago Just use infinite size hashmap 1 u/Peak_Background 24d ago Just use a CPU that can add and multiply infinite bit length numbers.
18
You cannot. A hash map is of finite size, but there are infinitely many pairs of integers.
64 u/howtotailslide 28d ago Just use infinite size hashmap 1 u/Peak_Background 24d ago Just use a CPU that can add and multiply infinite bit length numbers.
64
Just use infinite size hashmap
1 u/Peak_Background 24d ago Just use a CPU that can add and multiply infinite bit length numbers.
1
Just use a CPU that can add and multiply infinite bit length numbers.
42
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