Easy · Math

Find single number

Given a non-empty integer array nums in which every value appears exactly twice except for one value that appears once, return that single value.

Examples

Example 1

[4,1,2,1,2] → 4

Output: single = 4

Example 2

[7,3,5,3,7] → 5

Output: single = 5

Rebuild it in the studio

Open every published interview problem, solution, scene, and memory room free, with no account.

More Math problems