As reported: Cisco, C++-focused role, round 1 (2026): find the unique elements in an array.
Given an integer array nums, return the values that appear exactly once, in the order they appear in nums.
Example 1
nums = [4,5,4,6,7,5] -> [6,7]
Example 2
nums = [1,1,2,2] -> []
Constraints: 0 ≤ nums.length ≤ 10^5; -10^9 ≤ nums[i] ≤ 10^9.
Code runner format: one line, nums as JSON. Implement uniqueElements(nums); the harness prints the list.
Clarifications
- A value that appears two or more times is not unique, and none of its copies is returned.