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

		for (Node x = first; x != null; x = x.next)
		{
			// cmp++;
			if (key.equals(x.key)) // Search hit: update val
			{
				x.val = val;
				return;
			}
		}
		first = new Node(key, val, first); // Search miss: add new node
		N++;
	}