title: Determine the run-time of a pseudo code
body: <p>I have the following pseudo-code which I want to determine its run-time T(n).
  Can someone please give me the steps I should follow ?
  Here is the code:</p>
  
  <pre><code>i := 1;
  while (i &lt;= n)
     j := i;
     x := x+A[i];
     while (j &gt; 0)
        y := x/(2*j);
        j = j /2; // Assume here that this returns the floor of the quotient
     i = 2 * i;
  return y;
  </code></pre>