2019.4.20
@Override
public void remove(K key
) {
int startIndex
= hash(key
.hashCode());
int jump
= 1;
while(table
[startIndex
] != null
){
if(table
[startIndex
].getKey().equals(key
)){
table
[startIndex
] = null
;
size
--;
break;
}
startIndex
= (startIndex
+ jump
*jump
) % capacity
;
jump
++;
}
}
转载请注明原文地址:https://ipadbbs.8miu.com/read-689.html