title: Calculating time complexity of a recursive function having a loop inside it
body: <p>I was working on a simple problem and I came up with a recursive function in C++, below is my function.</p>
  
  <pre><code>void test(int arr[],int n,int x = 0){
      cout&lt;&lt;arr[x];
      for(int i = x+1;i &lt; n;i++){
          test(arr, n, i);
      }
  }
  </code></pre>
  
  <p>I wonder what will be the time complexity of the above function if anyone can calculate the time complexity for the above method it will be a great help in improving my function.</p>