Exemple #1
0
        public void Remove(Key key)
        {
            LinkedListThree <Key, Value> lst = hashtable[Hash(key)];

            if (lst.Contains(key))
            {
                lst.RemoveEle(key);
                N--;
            }
        }
Exemple #2
0
        public void Add(Key key, Value value)
        {
            LinkedListThree <Key, Value> lst = hashtable[Hash(key)];

            if (lst.Contains(key))
            {
                lst.Set(key, value);
            }
            else
            {
                lst.Add(key, value);
                N++;
            }
        }
 public bool ContainsKey(Key key)
 {
     return(list.Contains(key));
 }
Exemple #4
0
        public bool Contains(Key key)
        {
            LinkedListThree <Key, Value> lst = hashtable[Hash(key)];

            return(lst.Contains(key));
        }