Skip to content

An implementation of the own Hash Table with Separate Chaining

Notifications You must be signed in to change notification settings

LadyPython/HashTable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

HashTable

An implementation of the own Hash Table with Separate Chaining

Constructors:

  1. The default constructor.
  2. The constructor by begin-end iterators of std::pair<key, value> sequence.
  3. The constructor by a std::initializer_list of std::pair<key, value>. Сonstructors must support the ability to pass a hasher object of type Hash as the last argument. If it is not passed, the constructor by default is used.

Iterators:

Forward iterators: iterator addresses std::pair<const KeyType, ValueType>& and const_iterator addresses const std::pair<const KeyType, ValueType>&

Methods:

  1. size()
  2. empty()
  3. hash_function() returns hasher by value
  4. insert(std::pair<key, value>). If such key already exists, method does nothing
  5. eraser(key). If such key doesn't exist, method does nothing
  6. begin() for both iterator types
  7. end() for both iterator types
  8. find() for both iterator types
  9. operator []
  10. at(key). If such key doesn't exist, throw std::out_of_range
  11. clear()

About

An implementation of the own Hash Table with Separate Chaining

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages