Given a array 2 3 4 2 4 5 8 9 9 in which some numbers are repeated,remove the duplicate elements and do it in place.so new array should be 2 4 5 8 9

# Remove duplicate numbers

**Neha_Goyal**#2

we have an array of size n and firstly make this array into sorted form then remove duplicacy

by foll steps if n==0 && n==1 then return n

2. initialize new variable(k) to 0 that act as an index for next unique element

3. for loop till n-1 and repeat 4 -5

4. if a[i]!=a[i++]

5. a[k++]=a[i]

6. return k

7. then make upr as a function

thnn this k is the new size of the array