@Override
	public void put(Key key, Value val)
	{
		if (val == null)
			delete(key);

		if (N >= M / 2)
			resize(2 * M);

		int i;
		for (i = hash(key); keys[i] != null; i = (i + 1) % M)
			if (key.equals(keys[i]))
			{
				vals[i] = val;
				return;
			}

		keys[i] = key;
		vals[i] = val;
		N++;
	}