Removing duplicates from an array in C/C++ in O(n) time
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 king 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

Thanks in advance,
Removing duplicates from an array in C/C++ in O(n) time
===

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 king 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

Thanks in advance,