Exercises/#84 Missing Number
#84

Missing Number

Easy⚡ Bit Manipulation
40 XP

Problem

Given an array containing n distinct numbers in range [0, n], find the one missing number.

Examples

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

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

Input: nums=[9,6,4,2,3,5,7,0,1]
Output: 8
bit-manipulationmathxor
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

84 / 150

Your Solution

⚡ JavaScript

to save progress and use AI features