Minimum no of changes required to make array strictly increasing
问题 I have a problem in which we have an array of positive numbers and we have to make it strictly increasing by making zero or more changes to the array elements. We are asked the minimum number of changes required to make the array strictly increasing. Example if array is 1 2 9 10 3 15 so ans=1 if change 3 to some number between 12 to 14. if 1 2 2 2 3 4 5 ans=5 since changing 2 to 3 then 2 to 4 then 3 to 5 then 4 to 6 then 5 to 7 Constraints: Number of elements in array <= 10^6 Each element <=