We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 503deba commit ce0187eCopy full SHA for ce0187e
1 file changed
src/main/lists/HashTable.java
@@ -130,7 +130,7 @@ public V get(K key) {
130
return null;
131
}
132
133
- private void rehash(int newCapacity) {
+ private void resize(int newCapacity) {
134
Object[] newBuckets = new Object[this.capacity = newCapacity];
135
136
for (Object bucket: this.buckets) {
@@ -149,11 +149,11 @@ private void rehash(int newCapacity) {
149
150
151
private void expand() {
152
- this.rehash(this.capacity * 2);
+ this.resize(this.capacity * 2);
153
154
155
public void shrink(float minimumLoadFactor) {
156
- this.rehash((int) Math.ceil(this.length / minimumLoadFactor));
+ this.resize((int) Math.ceil(this.length / minimumLoadFactor));
157
158
159
public float measureClustering() {
0 commit comments