<commit_before><commit_msg>I have a vision. To go through all the exercises on cracking the coding interview book. ;)<commit_after>import java.util.HashSet;

//Problem 1.
//Check if a string has all unique characters.
//
public class UniqueChars {

	/**
	 * @param args
	 */
	
	public Boolean hasUniqueCharacters(String string){
		HashSet<Character> charSet = new HashSet<Character>();
		for(Character c:string.toCharArray()){
			if(charSet.contains(c)){
				return false;
			}
			charSet.add(c);
		}
		
		return true;
	}
	
	public static void main(String[] args) {
		UniqueChars uniqueChars = new UniqueChars();
		System.out.println("Returns true -" + uniqueChars.hasUniqueCharacters("abcdef"));
		System.out.println("Returns true -" + uniqueChars.hasUniqueCharacters("qwertyuioplk;,mnbvfcx"));
		System.out.println("Returns false -" + uniqueChars.hasUniqueCharacters("kbvvbjsdbvjhbhjv"));
		System.out.println("Returns true -" + uniqueChars.hasUniqueCharacters(""));



	}

}
{'fraction_non_alphanumeric': 0.13408393039918118, 'fraction_numerical': 0.0010235414534288639, 'mean_word_length': 4.52542372881356, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6274506', 'n_tokens_mistral': 346, 'n_tokens_neox': 298, 'n_words': 70}