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

Add support for converting a HashSet to an Array or a Slice #43

Open
tur11ng opened this issue Jul 2, 2023 · 1 comment
Open

Add support for converting a HashSet to an Array or a Slice #43

tur11ng opened this issue Jul 2, 2023 · 1 comment

Comments

@tur11ng
Copy link

tur11ng commented Jul 2, 2023

I think this will be a very handful feature and such a method is really common and is provided by other languages such as Java or Python for example. Let me know if you need any help with the implementation

@tur11ng
Copy link
Author

tur11ng commented Jul 2, 2023

For example such a method would be really helpful, myCustomSet.AsSlice(). But I see that you have implemented the HashSet using a HashMap and the latter uses a continuous array for the Entry values not two separate ones, one for the Key and one for the Values. You implementations performs better for looping through the entries as a whole but it doesn't provide a direct efficient way of accessing the keys or the values.

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

1 participant