class Solution {
func containsDuplicate(_ nums: [Int]) -> Bool {
let set = Set(nums)
return set.count != nums.count
}
}
leetcode存在重复
最新推荐文章于 2021-12-19 16:04:49 发布
class Solution {
func containsDuplicate(_ nums: [Int]) -> Bool {
let set = Set(nums)
return set.count != nums.count
}
}