Skip to content
Snippets Groups Projects
Commit 05757c2c authored by Martin Schmollinger's avatar Martin Schmollinger
Browse files

decrease size after deleting an object from hashtable

parent 202defac
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,9 @@ public class HashSet<E> implements Set<E> {
public boolean remove(E e) {
int pos = hashFunction(e.hashCode());
List<E> list = hashtable.get(pos);
return list.remove(e);
boolean ok = list.remove(e);
if (ok) size--;
return ok;
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment