As reported: Adobe Computer Scientist 1 loop (Illustrator team, Bangalore, 2025), round 1 (DSA in pseudo code and C++): Best Time to Buy and Sell Stock with its variations II and III, House Robber I and II, and Single Number I and III.
This is LeetCode 136 — Single Number.
Every value in nums appears exactly twice, except one value that appears once. Return that value, in linear time and constant extra space.
Example 1
nums = [4,1,2,1,2]
Output: 4
Example 2
nums = [2,2,1]
Output: 1
Constraints: 1 ≤ nums.length ≤ 3·10^4; -3·10^4 ≤ nums[i] ≤ 3·10^4.
Code runner format: one JSON value per line: nums. Implement singleNumber(nums); the harness prints the value.