Skip to content

Implementation of the Hash Table Data Structure in C++

Notifications You must be signed in to change notification settings

mosamaasif/Hash_Table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MIT License


Logo

Hash Table

Implementation of the Hash Table Data Structure

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License

About The Project

This is an implementation of the Hash Table Data Structure in C++ that I made as part of an assignment in my Data Structures Course at the University. Hash Table is a special Data Structure that uses any object as a key into an array of other objects (key, value pair). The key is generated by hashing the objects and generating some integer value. Different hashing techniques are used. This uses very simple bitwise operations to manipulate the values, and caters for certain types such as uint64, string/const char*, char etc. If a key hashes to same index, it uses linked list to store them at that index. Also it increases size of Table by finding next largest prime, since that can prevent issues caused by even/odd bias, or using comp address which fills up half the table etc.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • C++ - Google for your OS.
  • git

Installation

  1. Clone the repo
    git clone https://github.com/saeenyoda/Hash_Table.git

Usage

How to Run

  1. Open up command line or terminal and navigate to the cloned repo's directory
    cd "PATH-TO-DIRECTORY"
  2. Run the main.cpp file (Using terminal on mac)
    clang++ -std=c++14 -stdlib=libc++ -I "PATH-TO-includes-FOLDER" "PATH-TO-main.cpp" "PATH-TO-file.cpp" -o out/release/main 

NOTE:
      The instructions given above are for mac and that too using the terminal. For other OS and IDEs refer to the relevant docs.

License

Distributed under the MIT License. See LICENSE for more information.

About

Implementation of the Hash Table Data Structure in C++

Topics

Resources

Stars

Watchers

Forks

Languages