@Override
    public void addWord(String s) {
    	// Equivalent of rho function
    	int nbTrailingZeros = Integer.numberOfTrailingZeros(func.hashString(s));
    	
    	// Consider only words whose hash value begins with more than b zeros.
    	if (nbTrailingZeros >= b) {
    		HashMap<String, Integer> l = strTab.get(nbTrailingZeros);
    		
    		Integer i = l.get(s);
    		// If we have already seen the word, increase its number of occurrences.
    		// Else add the word to the array at the proper position.
			if (i == null)
				l.put(s, 1);
			else
				l.put(s, i.intValue() + 1);
    	}
    	
    	// If the array has more than 2*k elements stored, remove the elements with less than b
    	// trailing zeros then increase b, until the array has less than 2*k elements.
    	while (nbElements >= 2 * k) {
    		nbElements -= strTab.get(b).size();
    		strTab.set(b, null);
    		b++;
    	}
    }