Re:Solving “Two Sum” in C with a tiny hash table
by aidenn0 on Thursday June 29, 2023 @03:46PM
(#36525751)
If you pick base 2 for the then log2(10000) is about 13. So if you are a constant factor of >13 faster for the work that dominates, the n*log(n) will be faster.
Slightly OT:
I remember in my algorithms class we used to joke that log(log(N)) was the same as a constant factor of 5 (in the 64-bit era, perhaps we should say 6).
Slightly OT:
I remember in my algorithms class we used to joke that log(log(N)) was the same as a constant factor of 5 (in the 64-bit era, perhaps we should say 6).