Skip to content

Commit af2f539

Browse files
committed
i have no idea
1 parent b7005f8 commit af2f539

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

HashTable/LinearProbing/LPHashTable.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import HashTable.HashTableInterface;
44
import java.util.function.Function;
55

6-
public class HashTableLP<K, V> implements HashTableInterface<K, V> {
6+
public class LPHashTable<K, V> implements HashTableInterface<K, V> {
77

88
private Node[] array;
99
private Function<K, Integer> foh;
@@ -12,12 +12,12 @@ public class HashTableLP<K, V> implements HashTableInterface<K, V> {
1212
private int numCollisions = 0;
1313
private int numResizes = 0;
1414

15-
public HashTableLP() {
15+
public LPHashTable() {
1616
array = new Node[INITIAL_TABLE_SIZE];
1717
foh = getHashingFunction();
1818
}
1919

20-
public HashTableLP(Function<K, Integer> f) {
20+
public LPHashTable(Function<K, Integer> f) {
2121
array = new Node[INITIAL_TABLE_SIZE];
2222
foh = f;
2323
}
@@ -135,7 +135,7 @@ public void printGraph() {
135135

136136
public static void main(String[] args) {
137137

138-
HashTableLP<String, String> ht = new HashTableLP<>();
138+
LPHashTable<String, String> ht = new LPHashTable<>();
139139
ht.put("banana", "yellow");
140140
ht.put("apple", "green");
141141
ht.put("android", "green");
@@ -159,7 +159,7 @@ public static void main(String[] args) {
159159
ht.printStatus();
160160

161161
// Testing
162-
HashTableLP<String, String> table = new HashTableLP<>();
162+
LPHashTable<String, String> table = new LPHashTable<>();
163163
for (int i = 0; i < 100000; i++) {
164164
table.put(HashTableInterface.randomString(), HashTableInterface.randomString());
165165
}

HashTable/SeparateChaining/SCHashTable.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import HashTable.HashTableInterface;
44
import java.util.function.Function;
55

6-
public class HashTableSC<K, V> implements HashTableInterface<K, V> {
6+
public class SCHashTable<K, V> implements HashTableInterface<K, V> {
77

88
private Node[] array;
99
private Function<K, Integer> foh;
@@ -12,12 +12,12 @@ public class HashTableSC<K, V> implements HashTableInterface<K, V> {
1212
private int numCollisions = 0;
1313
private int numResizes = 0;
1414

15-
public HashTableSC() {
15+
public SCHashTable() {
1616
array = new Node[tableSize];
1717
foh = getHashingFunction();
1818
}
1919

20-
public HashTableSC(Function<K, Integer> f) {
20+
public SCHashTable(Function<K, Integer> f) {
2121
array = new Node[tableSize];
2222
foh = f;
2323
}
@@ -164,7 +164,7 @@ public void printGraph() {
164164

165165
public static void main(String[] args) {
166166

167-
HashTableSC<String, String> ht = new HashTableSC<>();
167+
SCHashTable<String, String> ht = new SCHashTable<>();
168168
ht.put("banana", "yellow");
169169
ht.put("apple", "green");
170170
ht.put("android", "green");
@@ -189,7 +189,7 @@ public static void main(String[] args) {
189189
ht.printStatus();
190190

191191
// Testing
192-
HashTableSC<String, String> table = new HashTableSC<>();
192+
SCHashTable<String, String> table = new SCHashTable<>();
193193
for (int i = 0; i < 100000; i++) {
194194
table.put(HashTableInterface.randomString(), HashTableInterface.randomString());
195195
}

0 commit comments

Comments
 (0)