Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct.
给你一个数字数组,判断有没有重复元素,有就返回true,没有返回false
将数组转换成Set,看两者的长度是否一样。