mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
Add dynamic hash table functionality
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user