### Missing One Number In Array

##### An array contains all the integer from 0 to n, expect for one number which is missing. Find missing number in O(n) in O(1) extra space.

**Fact**

- Sum of firs n natural number [i.e. Sum (1+2+3+………+n)] = n(n+1)/2

##### Algorithm:

- Find sum of array’s of elements
- Find sum of n natural number
- Return sum_of_natural_number – sum_of_array’s_element

Latest Source Code:

Github: MissingOneNumberInArray.java

**Output:**

Array: [2, 1, 5, 3] N: 5 Missing Number: 4