MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms /

Method

Hashtable/design-hashset.java:3–5  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1int size = (int)Math.pow(10, 6)+1;
2 boolean[] flag;
3 public MyHashSet() {
4 flag = new boolean[size];
5 }
6
7 public void add(int key) {
8 flag[key]=true;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected