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

            if (lst.Contains(key))
            {
                lst.RemoveEle(key);
                N--;
            }
        }
示例#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));
 }
示例#4
0
        public bool Contains(Key key)
        {
            LinkedListThree <Key, Value> lst = hashtable[Hash(key)];

            return(lst.Contains(key));
        }