@SuppressWarnings("unchecked")
    public void put(String k, E v) {
        int hash = Math.abs(k.hashCode() % SIZE);
        Entry<E> e = (Entry<E>) table[hash];
        if(e != null) {
            // it means we are trying to insert duplicate
            // key-value pair, hence overwrite the current
            // pair with the old pair
            if(e.key.equals(k)) {
                e.value = v;
            } else {
                // traverse to the end of the list and insert new element 
                // in the same bucket
                while(e.next != null) {
                    e = e.next;
                }
                Entry<E> entryInOldBucket = new  Entry<E>(k, v);
                e.next = entryInOldBucket;
                ar.add(k);
               
            }
        } else {
            // new element in the map, hence creating new bucket
            Entry<E> entryInNewBucket = new Entry<E>(k, v);
           // entryInNewBucket.index = size;
            table[hash] = entryInNewBucket;
            ar.add(k); 
        }
    }