
Given an integer array nums, return all values that appear more than once. Each duplicate value should appear exactly once in the result, and the result may be returned in any order.
nums = [1, 2, 3, 2, 4, 1, 5]Output[1, 2]Why1 and 2 occur more than once.nums = [7, 7, 7, 7]Output[7]WhyOnly 7 is duplicated, so it appears once in the output.`1 <= len(nums) <= 10^5``-10^9 <= nums[i] <= 10^9`Return each duplicate value only onceOutput order does not matter