Question
Given an integer arrayÂ
nums
, returnÂtrue
 if any value appears at least twice in the array, and returnÂfalse
 if every element is distinct.
This is anarrays question.
Idea
Use a hashmap to store “seen” values which you can index into in O(1) time, iterate through the nums list checking if each number seen is in the hashmap.