title: Big O Notation with function composition
body: <p>I'm trying to determine the Big O notation of the following function</p>
  
  <pre><code>public static int f10(int n)
  {
      return f1(n*n*n)
  }
  </code></pre>
  
  <p>Where f1() is given by:</p>
  
  <pre><code>public static int f1(int n)
  {
      int sum = 0;
      for (int i = 0; i &lt; n; i++) {
          for (int j = 0; j &lt; n; j++)
              sum++;
          for (int j = 0; j &lt; n; j++)
              sum++;
          for (int j = 0; j &lt; n; j++)
              sum++;
      }
      return sum;
  }
  </code></pre>
  
  <p>I can see that O(f1) is O(n^2), but when we call f10, does this become O(n^6) because the size of n is being cubed before calling f1?</p>
  
  <p>I understand the complexity of f1 is not changing from it's own perspective, but is it from f10's perspective of 'n'? </p>