Changed the hasmap of arraylist to hashmap of hashset

we need to remove duplicate values from being searched and
stored so changing to a hashset is logical