Find All Duplicates
Every number in nums appears either once or twice. Return the numbers that appear twice, sorted in increasing order.
Example 1
nums [4,3,2,7,8,2,3,1]
returns [2,3]
2 and 3 appear twice.
Example 2
nums [1,2]
returns []
No repeats.
Constraints
1 <= len(nums) <= 50- Each value appears at most twice.
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.