title: Minimum changes required to make a given array strictly increasing
body: <p>I am trying to solve this problem of SPOJ <a href="http://www.spoj.com/problems/DOSA" rel="nofollow">http://www.spoj.com/problems/DOSA</a> which is also a question of some interview.</p>
  
  <p>My logic is from the given array take the elements which satisfies a[i]>i (0 based indexing) since others always need to be changed.</p>
  
  <p>Now find the Longest Strictly Increasing Sub Sequence from these selected elements and the final answer is original length of the array-calculated LIS 
  example : 
  the original array is : 1 7 10 2 20 22 <br>
  The new array calculated as per a[i]>i is 1 7 10 20 22 <br><br>
  Now, the LIS of this array is 5<br>
  So, the final answer is 6-5=1<br>
  but its giving Wrong answer can anyone point me out where is my logic wrong.</p>
  
  <p>EDIT: 
  Problem Statement :
  Lalith is going to have dinner and he has  N dosas in front of him with their prices represented by sequence of integers a1,a2,a3...an. </p>
  
  <p>And he has decided to eat in a different manner . You are free to replace the price of any dosa with any positive integer. </p>
  
  <p>How many prices(integers) must be replaced to make the resulting sequence strictly increasing?</p>
  
  <p>Sample Input :
  6</p>
  
  <p>1 7 10 2 20 22</p>
  
  <p>Sample output :
  1</p>