1) Given an string, write a method called HashMap<String, Integer> countTheLetters(String input)
that returns a map containing a count for each of each of the letters in the string. For full credit, your solution should be O(n).
countTheLetters("dog"); // returns a map containing the pairs {d: 1, o: 1, g: 1}
countTheLetters("elephant"); // returns a map containing the pairs {e: 2, l: 1, p: 1, h: 1, a: 1, n: 1, t: 1}
countTheLetters("llama"); // returns a map containing the pairs {l: 2, a: 2, m: 1}
2) Given an array of integers, write a method called int[] removeDupes(int[] input)
that returns a new array of just the unique values. You may use additional data structures in your solution.
removeDupes(new int[]{1, 2, 3, 4, 5, 1, 2, 3}); // returns {4, 5}
removeDupes(new int[]{7, 7, 7, 7, 7}} // returns {}