public SeparateChainingHashST(int M) { this.M = M; st = new SequentialSearchST <TKey, TValue> [M]; for (int i = 0; i < M; i++) { st[i] = new SequentialSearchST <TKey, TValue>(); } }
public void SequentialSearchST_putTwice_sizeIs2() { var st = new SequentialSearchST <string, string>(); st.put("a", "A"); st.put("b", "B"); var res = st.size(); Assert.AreEqual(res, 2); }
public void SequentialSearchST_putAndDelete_sizeIs0() { var st = new SequentialSearchST <string, string>(); st.put("a", "A"); st.delete("a"); var res = st.size(); Assert.AreEqual(res, 0); }