Posted by : Abdallah Rabie
Problem Name: Remove Duplicates From Sorted Array
Platform: leetcode
Link: Remove Duplicates From Sorted Array
- Without making any space for another array.
- To modify the new array to be sorted.
The function has 2 parameter the array , the size and the returning data type is int.
The algorithm :
- Create for loop to go through the whole array and create index variable with finial value 1 to return the array size.
- Check the first element with the second element if not equal that means that there is no equilty between this two element so store the the n+1 element in the num index.
- Go on for the whole array and return the final array size.