Given an array of integers, find ifthe array contains any duplicates. Your function should returntrueif any value appears at least twice inthe array, andit should returnfalseifevery element is distinct.
Subscribe to see which companies asked this question
题目: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