Esempio n. 1
0
 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>();
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }