Add dynamic hash table functionality

This commit is contained in:
Ray
2020-08-17 19:22:32 -04:00
parent ee11fcafd9
commit ed1273a35d
2 changed files with 46 additions and 10 deletions

View File

@ -17,6 +17,7 @@ public class MainLinearProbing {
System.out.println("3. Print Table");
System.out.println("4. Exit");
System.out.println("5. Search and print key index");
System.out.println("6. Check load factor");
choice = In.nextInt();
@ -46,7 +47,12 @@ public class MainLinearProbing {
System.out.println("Enter the Key to find and print: ");
key = In.nextInt();
System.out.println("Key: "+ key + " is at index: "+ h.findHash(key));
break;
}
case 6: {
h.checkLoadFactor();
break;
}
}
}