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

Time complexity of HashSet.member is O(log(n))? #144

Closed
vaibhavsagar opened this issue Feb 7, 2017 · 1 comment
Closed

Time complexity of HashSet.member is O(log(n))? #144

vaibhavsagar opened this issue Feb 7, 2017 · 1 comment

Comments

@vaibhavsagar
Copy link
Contributor

The time complexity of member is stated to be O(min(n,W)) but its implementation is identical to HashMap.member whose time complexity is stated as O(log n). Is the documentation incorrect or is there something I'm missing?

@tibbe
Copy link
Collaborator

tibbe commented Feb 7, 2017

That's a bug. It should be O(log n). This is a left-over from the previous implementation.

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