Coding language: C++. (Try to avoid linked lists if possible please). Add comments. Thanks. • Each functionality component must be implemented as a separate function, though the function does not need to be declared and defined separately • No global variables are allowed • No separate.hor.hpp are allowed • You may not use any of the hash tables, or hashing functions provided by the STL or Boost library to implement your hash table • Appropriate, informative messages must be provided for prompts and outputs You must implement a hash table using the Double Hashing collision strategy and the mid-square base 10 hashing function with an R of 2. Your collision strategy must be implemented as a separate function, though it may be implemented inside your insert/search/delete functions, and should halt an insert / search/delete functions, and should halt an insert/search/delete after table size number of collisions. Your hash function must be implemented as a separate function. Your hash table must store positive integers and contain 20 buckets. No global declarations. Functionality Your int main must have the menu allowing the user to choose between inserting, searching, deleting, and outputting the integers in your hash table. The user should be able to insert, search, delete, and output as many times as they wish. There should be an option to end the program. (Hint: enum/switch may be used). Insert a user specified integer If an insert is rejected due to the collision strategy halting, the function should output that the insert was rejected. Search for the first instance of a user specified integer If found, output that the integer exists upon finding the first instance of the integer. If the collision strategy halts, the function should output that the integer does not exist. No error checking required. Delete the first instance of a user specified integer If the desired integer is found, the function should tombstone the integer’s slot in the hash table, and report that the integer was deleted. If the collision strategy halts, the function should output that the integer does not exist. No error checking required Output all integers in the hash table starting at index 0 along with their index

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Coding language: C++. (Try to avoid linked lists if possible please). Add comments. Thanks.

• Each functionality component must be implemented as a separate function, though the function does not need to be declared and defined separately

• No global variables are allowed

• No separate.hor.hpp are allowed

• You may not use any of the hash tables, or hashing functions provided by the STL or Boost library to implement your hash table

• Appropriate, informative messages must be provided for prompts and outputs

You must implement a hash table using the Double Hashing collision strategy and the mid-square base 10 hashing function with an R of 2. Your collision strategy must be implemented as a separate function, though it may be implemented inside your insert/search/delete functions, and should halt an insert / search/delete functions, and should halt an insert/search/delete after table size number of collisions. Your hash function must be implemented as a separate function. Your hash table must store positive integers and contain 20 buckets. No global declarations.

Functionality

  • Your int main must have the menu allowing the user to choose between inserting, searching, deleting, and outputting the integers in your hash table. The user should be able to insert, search, delete, and output as many times as they wish. There should be an option to end the program. (Hint: enum/switch may be used).
  • Insert a user specified integer
    • If an insert is rejected due to the collision strategy halting, the function should output that the insert was rejected.
  • Search for the first instance of a user specified integer
    • If found, output that the integer exists upon finding the first instance of the integer.
    • If the collision strategy halts, the function should output that the integer does not exist.
    • No error checking required.
  • Delete the first instance of a user specified integer
    • If the desired integer is found, the function should tombstone the integer’s slot in the hash table, and report that the integer was deleted.
    • If the collision strategy halts, the function should output that the integer does not exist.
    • No error checking required
  • Output all integers in the hash table starting at index 0 along with their index
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Introduction to Template
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education