예제 #1
0
        public void Add(Key key, Value value)
        {
            LinkedList3 <Key, Value> list = hashtable[Hash(key)];

            if (list.Contains(key))
            {
                list.Set(key, value);
            }
            else
            {
                list.Add(key, value);
                N++;
            }
        }
예제 #2
0
 //O(n)
 public void Set(Key key, Value newValue)
 {
     list.Set(key, newValue);
 }
예제 #3
0
        public void Set(Key key, Value newValue)
        {
            LinkedList3 <Key, Value> list = hashtable[Hash(key)];

            list.Set(key, newValue);
        }