From bc6677a5fee3f84f584da02fe4769a7e2f413a05 Mon Sep 17 00:00:00 2001 From: Harun Teper Date: Wed, 24 Jun 2020 16:33:11 +0200 Subject: [PATCH] added README --- README.md | 19 +++++++++++++++++++ README.md.txt | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 README.md create mode 100644 README.md.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..afebe0b --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +Hashtable - Creates a hashtable of size 10 + +void insert(int id, T* n) - Insert or replace data with that key in the table + +T* search(int id) - Return data pointer for that key + +bool remove(int id) - Remove an element with that key + +void restructure() - Doubles the hashtable size and inserts all existing elements + +int getSize() - get hashtable size + +int getElements() - get number of inserted elements + +double getUtilization() - get the average number of elements per inner list + +void print() - print all lists + +int hash(int id) - returns hash value for key \ No newline at end of file diff --git a/README.md.txt b/README.md.txt new file mode 100644 index 0000000..afebe0b --- /dev/null +++ b/README.md.txt @@ -0,0 +1,19 @@ +Hashtable - Creates a hashtable of size 10 + +void insert(int id, T* n) - Insert or replace data with that key in the table + +T* search(int id) - Return data pointer for that key + +bool remove(int id) - Remove an element with that key + +void restructure() - Doubles the hashtable size and inserts all existing elements + +int getSize() - get hashtable size + +int getElements() - get number of inserted elements + +double getUtilization() - get the average number of elements per inner list + +void print() - print all lists + +int hash(int id) - returns hash value for key \ No newline at end of file