Suppose i have an array like
int array[] = {1,1,1,4,5,7,7,9,11};
I should be able to remove all the duplicates and hence my output should be {1,4,5,7,9,11}.
Constraints:
- I am not allowed to use any kind of extra memory apart from variables
- I should be able to resize the array
- I am not allowed to use containers like Hashset or set etc:
- Should be done in O(n) time