@Override public int insert(String elem){
  int firstIndex=(int)(elem.charAt(0) - 'a');
  int lastIndex=(int)(elem.charAt(elem.length() - 2) - 'a');
  storage[firstIndex * 26 + lastIndex]=elem;
  return 1;
}

@ Override public int insert ( String elem ) { int firstIndex = ( int ) ( elem . charAt ( 0 ) - 'a' ) ; int lastIndex = ( int ) ( elem . charAt ( elem . length ( ) - 2 ) - 'a' ) ; storage [ firstIndex * 26 + lastIndex ] = elem ; return 1 ; }
insert element into collection . < p > should the count of attempted slots reach the array size , declare that the element cannot be added ( either because of a poor hash function or because the array is full ) . < p > if element already exists within collection , return its position . that is , no duplicates are allowed , yet we silently ignore requests to repeatedly add the same element into the collection .
