I have a load of Strings.
I want to find a single String in that load.
If my Strings are in an array I would have to go through each entry, comparing my String against each one in the array until I find one. For a HashSet I would simply have to find the "bucket" that represents my hash and look at the few (preferably one) that I then do an equals on.
No comments:
Post a Comment