3 ms·
> The real point of this post is that when you have a little n, Big-O doesn't matter. This is absolutely correct, however if this is done in a sufficiently gen
by gergelykalman 6y ago
> The real point of this post is that when you have a little n, Big-O doesn't matter.
This is absolutely correct, however if this is done in a sufficiently generic programming language, there is a very good chance that falling back on a linked list on collision is a bad idea.
This has been well-researched and most programming languages have chosen a hash algorithm that resists (blind) collision generation, precisely for this reason.
I wrote some code recently to demonstrate this:
https://github.com/gergelykalman/bigOH https://github.com/gergelykalman/bigOH