Map Has Duplicate Values
Write a method
hasDuplicateValues that, given a non-
Map<String, String>, returns
true if the map
contains duplicate values—meaning that two different keys map to the same value—and
Recall that a map can never contain duplicate keys, since the second mapping from the same key overwrites the
You should use a
Set to solve this problem!
You do not need to
HashSet, since these are already provided for you.