Question: I have this code below, and I need to implement this program to demonstrate quadratic hash probing when a collision occurs. The language is C++
I have this code below, and I need to implement this program to demonstrate quadratic hash probing when a collision occurs. The language is C++
#include
using namespace std;
int main(){
string data[100]; int n; string str; int count = 0;
for (int i = 0; i<100; i++) data[i] = "-1"; while(true){ cout << "1.Insert key "; cout << "2.delete key "; cout << "3.Display Hash Table "; cout << "4.Exit "; cout << "Enter choice:"; cin >> n; if (n == 4){ break; } if (n == 1){ if (count < 100){ cout << "Enter key:"; cin >> str; int sum = 0; for (int i = 0; i } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
