Skip to content

Instantly share code, notes, and snippets.

@wrightak
wrightak / Set.java
Created February 19, 2021 07:01
Simple HashSet implementation
import java.util.Objects;
public class Set {
private final Object[][] elements;
private int size = 0;
public Set(int capacity) {
elements = new Object[capacity][];
}
public Set() {
this(32);

Keybase proof

I hereby claim:

  • I am wrightak on github.
  • I am wrightak (https://keybase.io/wrightak) on keybase.
  • I have a public key ASB6ufDcUVX8JAuhwGfeKeqftv6A61eRtdZx8yMjCO3Djgo

To claim this, I am signing this object: