public char findFirstDuplicate(){
		HashMap<Character, Integer> charList = new HashMap<Character, Integer>();
		
		for(int i=0;i<charArray.length; i++){
			if(charList.containsKey(charArray[i])){
				System.out.println("memory used: " + charList.size());
				return charArray[i];
			}else {
				//index in
				charList.put(charArray[i],1);
			}
		}
		return 0;
	}