
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.
题目分析:
要找出一个数组中是否有重复的元素,可以同set或者map等数据结构进行处理。
1 |
class Solution { |




近期评论