title: What is the time complexity and space complexity of following code
body: <p>I want to know the time complexity of following piece of code</p>
  
  <pre><code>for (i = 0; i &lt; n; i++) {
      for (j = i + 1; j &lt; n; j++) {
          printf("hi")
      }
  }
  </code></pre>