title: Big 0 notation for duplicate function, C++
body: <p>What is the Big 0 notation for the function description in the screenshot.</p>
  
  <p>It would take O(n) to go through all the numbers but once it finds the numbers and removes them what would that be? Would the removed parts be a constant A? and then would the function have to iterate through the numbers again?</p>
  
  <p>This is what I am thinking for Big O</p>
  
  <p>T(n) = n + a + (n-a) or something involving having to iterate through (n-a) number of steps after the first duplicate is found, then would big O be O(n)?</p>
  
  <p><a href="https://i.stack.imgur.com/WZrIm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WZrIm.png" alt="Duplicate Function Description"></a></p>