Professional Documents
Culture Documents
12 Hash Table
12 Hash Table
12 Hash Table
void main()
{
int a[MAX], i, choice;
for (i=0;i<MAX;i++) // initialize HT with no entries
a[i] = -1;
while(1)
{
printf("\n Collision handling by Linear Probing ");
printf("\n1. Insert into Hash table");
printf("\n2. Display Hash table");
printf("\n3. Exit");
printf("\n Enter your Choice : ");
scanf("%d",&choice);
switch (choice)
{
case 1: linear_prob(a);
break;
case 2: display(a);
break;
case 3: return;
default: printf("\n Invalid Choice");
} // end of switch
} // end of while
} // end of main