Exemplo n.º 1
0
 //O(n)
 public void Add(E e)
 {
     if (!list.Contains(e))
     {
         list.AddFirst(e);
     }
 }
Exemplo n.º 2
0
        public void Remove(Key key)
        {
            LinkedList1 <Key> list = hashtable[Hash(key)];

            if (list.Contains(key))
            {
                list.Remove(key);
                N--;
            }
        }
Exemplo n.º 3
0
        public void Add(Key key)
        {
            LinkedList1 <Key> list = hashtable[Hash(key)];

            if (list.Contains(key))
            {
                return;
            }
            else
            {
                list.AddFirst(key);
                N++;
            }
        }
Exemplo n.º 4
0
        public bool Contains(Key key)
        {
            LinkedList1 <Key> list = hashtable[Hash(key)];

            return(list.Contains(key));
        }