Print Unique Numbers
Problem statement
Return each distinct integer from nums exactly once, preserving the order of its first appearance.
Function
uniqueNumbers(nums: int[]) → int[]Examples
Example 1
nums = [4,1,4,7,1,9]return = [4,1,7,9]Later copies of 4 and 1 are skipped.
Constraints
0 <= nums.length <= 2 * 10^5.