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++; } }
//O(n) public void Set(Key key, Value newValue) { list.Set(key, newValue); }
public void Set(Key key, Value newValue) { LinkedList3 <Key, Value> list = hashtable[Hash(key)]; list.Set(key, newValue); }