Your question is Array Duplicate Finder. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an integer array nums, return all values that appear more than once. Each duplicate value should appear only once in the output, and the output may be returned in any order.
Write a function that scans the array and identifies repeated values efficiently.
numsnumsdef find_duplicates(nums):