Fixed bugs to Dictionary Classes
This commit is contained in:
@@ -17,7 +17,7 @@ public class ChainingHashTableTest {
|
||||
|
||||
public static void main(String[] args) throws InvalidKeyException{
|
||||
|
||||
ChainingHashTable<String,Integer> h = new ChainingHashTable<String, Integer>();
|
||||
ChainingHashTable<String,Integer> h = new ChainingHashTable<String, Integer>(1);
|
||||
|
||||
System.out.println(h.load_factor());
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ public class LinearProbingHashTableTest {
|
||||
|
||||
public static void main(String[] args) throws InvalidKeyException{
|
||||
|
||||
LinearProbingHashTable<String,Integer> h = new LinearProbingHashTable();
|
||||
LinearProbingHashTable<String,Integer> h = new LinearProbingHashTable(1);
|
||||
|
||||
|
||||
System.out.println(h.load_factor());
|
||||
|
||||
@@ -89,12 +90,15 @@ public class LinearProbingHashTableTest {
|
||||
|
||||
|
||||
Entry<String,Integer> f = h.insert("7", 100);
|
||||
|
||||
System.out.println(h);
|
||||
|
||||
h.remove(f);
|
||||
System.out.println(h);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user