Leetcode 217: Contains Duplicate
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.
题意
大概为, 考虑一个整型的数组,找出是否该数组有重复的数。如果有数出现超过两次,那么你的函数返回ture
,否则返回false
。
程序(C语言)
|
|
结果
16 / 16 test cases passed.
Status: Accepted
Runtime: 12 ms