Iterating over a HashMap using Iterator interface
I am trying to find the unique number of occurrences of each value in the array. I am putting all occurrences of an element in the HashMap. I want to check whether any two adjacent values are the same in HashMap.
I have tried using the Iterator interface to iterate but there seems something missing