title: What are the differences between O(1) and O(2) in algorithm-analysis?
body: <p>According to the definition of big O <code>f(n) &lt;= C*g(n)</code>(which means <code>f(n) = O(g(n)</code>), it could be deduced that:</p>
  
  <pre><code>f(n) &lt;= C
  f(n) &lt;= 2C
  </code></pre>
  
  <p>I think there are no big differences between these two.  What I could come up with is:</p>
  
  <pre><code>f(n) = 1 - 1 / n
  f(n) = 2 - 1 / n
  C = 1
  </code></pre>
  
  <p>But what differs this two complexities,since both are constant complexity?</p>
  
  <p>Could you show some real world code to demonstrate the differences between O(1) and O(2).</p>