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