# 1

## Simple Approach

Sum all elements in the array and subtract it from the summation of the first N natural numbers using the formula N * (N + 1) / 2 to find the missing number.

Check out the code implementation to find out  the missing number!

## XoR Approach

Utilize the XOR property. Calculate a1 ^ a2 ^ ... ^ an = A1, a1 ^ a2 ^ ... ^ an-1 = A2. Then calculate A1 ^ A2 to find the missing number.

# 2

Check out the code implementation to find out  the missing number!

## Binary Search Method

Sort the array & then perform a binary search to find the missing number efficiently. Adjust the search space based on comparing middle element with its index.

# 3

Check out the code implementation to find out  the missing number!

## Hashing Technique

Create a hash set and store all array elements. Iterate through N natural numbers, checking if each exists in the hash set. The missing number is the one not found.

# 4

Check out the code implementation to find out  the missing number!

## Mathematical Deduction

Use a mathematical deduction. Calculate the expected sum and subtract the actual sum of the array to find the missing number.

# 5

Check out the code implementation to find out  the missing number!