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

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter17: Linked Lists
Section: Chapter Questions
Problem 18SA
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning