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存,再看大小是否變小,一行代碼搞定
新聞熱點(diǎn)
疑難解答