Skip to content

pisan343/arrayhash

Repository files navigation

Hash table implementation using separate chaining

Public functions

  // Constructor to initialize the hash table with a default size
  HashTable();

  // Destructor to clean up memory
  ~HashTable();

  // Copy constructor
  HashTable(const HashTable &other);

  // Assignment operator
  HashTable &operator=(const HashTable &other);

  // Get the current size of the hash table
  int size() const;

  // Calculate the load factor of the hash table
  double load_factor() const;

  // Insert a key-value pair into the hash table
  void insert(int key, int value);

  // Retrieve a value by key from the hash table
  int get(int key);

  // Remove a key-value pair from the hash table
  void remove(int key);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published