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.
Subscribe to see which companies asked this question.
用set存,再看大小是否变小,一行代码搞定
新闻热点
疑难解答