compar hashmap<string,arraylist<string>> and arraylist<string> java : I have a hashmap that contains a list of words map<string,arraylist<string>>
And a list that also contains words  I want to compare this list with the hashmap  Which gives us another hashmap that contains binary values 
1 if word exist 0 if not.
[The problem is it adds the first list to the 2nd ....
][1]


 


  [1]: https://i.stack.imgur.com/FoFNT.png