title: What does n mean in big-oh complexity?
body: <p>In Big-Oh notation, what does <code>n</code> mean? I've seen input size and length of a vector. If it's input size, does it mean memory space on the computer? I see <code>n</code> often interchangeably used with input size.</p>
  
  <p>Examples of Big-Oh,</p>
  
  <p><code>O(n)</code> is linear running time<br>
  <code>O(logn)</code> is logarithmic running time.  </p>
  
  <p>A code complexity analysis example, <strong>(I'm changing input <code>n</code> to <code>m</code>)</strong></p>
  
  <pre><code>def factorial(m):
     product = 1
     for i in range(1, m+1):
        product = product*i
     return product
  </code></pre>
  
  <p>This is O(n). What does <code>n</code> mean? Is it how much memory it takes? Maybe <code>n</code> mean number of elements in a vector? Then, how do you explain when <code>n=3</code>, a single number? </p>