Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a Ternary Search Tree #133

Closed
alkeldi opened this issue Jul 14, 2020 · 1 comment
Closed

Adding a Ternary Search Tree #133

alkeldi opened this issue Jul 14, 2020 · 1 comment

Comments

@alkeldi
Copy link
Collaborator

alkeldi commented Jul 14, 2020

Hash tables are an excellent data structure for amortized constant time operations. But, calculating the hash is not actually O(1). It's more like O(h), where h is the length of the hashed key.
With a ternary search tree, it's possible to get similar results to those obtained from a Hash Table without the need of resizing the table, or having extra unused entries as with the hash table.

@srdja
Copy link
Owner

srdja commented Jul 17, 2020

Yeah, it sounds good. We already have two different tables with different time/space properties, so I don't see why we shouldn't add another. More tools in the toolbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants