code: private void scan(final char[] input, final int start, final int end)
  	{
  
  		this.positions = new HashMap<Character, ArrayList<Integer>>();
  		ArrayList<Integer> list;
  
  		char c;
  		for (int i = start; i < end; i++) {
  			c = input[i];
  
  			list = positions.get(c);
  			if (list == null) {
  				list = new ArrayList<Integer>();
  				positions.put(c, list);
  			}
  
  			list.add(i);
  		}
  	}
docs: Scans the input and creates the character -> position mapping.
  
  @param input
  character array
  @param start
  start position
  @param end
  end position