Exercises/#81 Single Number
#81

Single Number

Easy⚡ Bit Manipulation
40 XP

Problem

Every element in an array appears twice except one. Find that single element using O(1) extra space.

Examples

Input: nums=[2,2,1]
Output: 1

Input: nums=[4,1,2,1,2]
Output: 4
bit-manipulationxor
AI Assistant— powered by AI

Unlock hints progressively — start gentle, go deeper only if needed.

💡

Level 1: Gentle Nudge

A subtle direction

🗺️

Level 2: Approach

The algorithm to use

🔍

Level 3: Detailed

Step-by-step guidance

81 / 150

Your Solution

⚡ JavaScript

to save progress and use AI features