Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Why explain hashtable? People are coming to this site specifically because they do not want to read and answer algorithmic questions on Stackoverflow :) Commented May 16, 2024 at 1:13
  • 1
    This answer boils down to Tell Don't Ask, but the OP is well aware or the principle. The real question is - where is the principle not applicable? Commented May 16, 2024 at 1:19
  • Just for interest, Swift doesn’t have a built-in class “Hashtable”. It has three classes where we would be 99.9% sure that they use a hash table internally: Dictionary (a key/value map), Set (contains keys) and CountedSet (where each key in a Set contains a counter telling us how often it has been added to a set). Commented Aug 8 at 18:26