Bit manipulation: Every value in nums appears exactly twice except one value that appears once. Return the single unpaired value.
Input: A JSON object { "nums": number[] }.
Output: A JSON integer containing the unpaired value.
Constraints:
- 1 <= nums.length <= 100001
- nums.length is odd
- Exactly one value appears once and every other value appears twice
Read one JSON value from stdin and print exactly one JSON-serialized answer to stdout with no extra text.
Difficulty: HARD. Variant: 21. Balance correctness, maintainability, and clear review-ready code.
Practice context
This coding (algo) exercise trains prompt interpretation, explicit assumptions, a concrete response, and a concise explanation of the decisions made. It is marked hard difficulty.
The signed-in workspace provides the tools required by the round, such as recording, code execution, diagrams, structured notes,