Given an integer array nums, return all elements that appear more than once.
The answer can be in any order.
Input: An integer array nums of length n.
Output: A sorted list of all integers that appear more than once.
Input: [4,3,2,7,8,2,3,1]
Output: [2,3]
Explanation: Frequencies: {4:1,3:2,2:2,7:1,8:1,1:1}. Elements with count>1: 2 and 3. Return [2,3].Input: [1,1,2]
Output: [1]
Explanation: 1 appears twice. 2 appears once. Return [1].Input: [1,2,3,4,5]
Output: []
Explanation: All elements appear exactly once. Return [].1 <= nums.length <= 10^5-10^9 <= nums[i] <= 10^9