title: decrease time complexity of loops
body: <p>I'm trying to make an array an increasing array , if an element at i+1 is less or equal to element at i, add an int n to that element several times  till it becomes more than than element at i so continue till the last element and print moves needed for entire process . I'm using for and while loop it is working just fine but for some cases it takes too much time. any advice to reduce time complexity and if it is possibe can you give me some info about it(btw I'm newbie)</p>
  
  <pre><code>int move=0;
  for(int i=0;i&lt;list.length-1;i++)
  {
    while(list[i+1]&lt;=list[i])
    {
      list[i+1]+=n;
      move++;
    }
  }
  </code></pre>