
Write a function to find whether a given array of integers c...
Prompt
Write a function to find whether a given array of integers contains any duplicate element. Your function should satisfy these tests: ```python assert test_duplicate(([1,2,3,4,5]))==False assert test_duplicate(([1,2,3,4, 4]))==True assert test_duplicate([1,1,2,2,3,3,4,4,5])==True ```
Answer guidance
Reference solution: def test_duplicate(arraynums): nums_set = set(arraynums) return len(arraynums) != len(nums_set)
Drag to resize
Drag to resize
Drag to resize